create_time_series {VWPre} | R Documentation |
Create a time series column
Description
create_time_series
standardizes the starting point for each
event, creates a time series for each event including the offset for the
amount of time prior to (or after) the zero point. The time series
is indicated in a new column called Time.
Usage
create_time_series(data, Adjust = 0)
Arguments
data |
A data table object output by |
Adjust |
Optionally an integer value or a text string. If an integer (positive or negative), this will indicate an amount of time in milliseconds. The value is subtracted from the time points: positive values shift the zero forward; negative values shift the zero backward. If a text string, this will be the name of a column in the data set which contains values indicating when the critical stimulus was presented relative to the zero point. |
Value
A data table object.
Examples
## Not run:
library(VWPre)
# To create the Time column...
df <- create_time_series(data = dat, Adjust = "SoundOnsetColumn")
# or
df <- create_time_series(data = dat, Adjust = -100)
# or
df <- create_time_series(data = dat, Adjust = 100)
## End(Not run)