Skip to contents

This function generates a continuous valued event sequence object from a given numeric vector. It can be used to create event sequences for continuous predictors in fMRI data analyses.

Usage

event_variable(vec, name, onsets, blockids = 1, durations = NULL)

Arguments

vec

A numeric vector representing the continuous event sequence values

name

A character string providing a name for the event sequence

onsets

A numeric vector of onsets for each event in the sequence

blockids

A numeric vector of block identifiers for each event in the sequence (default: 1)

durations

A numeric vector of durations for each event in the sequence (default: NULL)

Value

An object representing the continuous valued event sequence, with class "event_variable" and "event_seq"

See also

Examples

evar <- event_variable(c(1, 2, 3, 4, 5, 6), "example_var", onsets=seq(1, 100, length.out=6))
#> Error: length(durations) not equal to length(vals)