create_time_series: Create a time series column

Description Usage Arguments Value Examples

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

1
create_time_series(data, Adjust = 0)

Arguments

data

A data table object output by relabel_na or align_msg.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## 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)

VWPre documentation built on Nov. 30, 2020, 1:08 a.m.