event_term | R Documentation |
Generates an event model term from a list of named variables along with their onsets, block IDs, and durations. Optionally, a subset of onsets can be retained.
event_term(evlist, onsets, blockids, durations = 1, subset = NULL)
evlist |
A list of named variables. |
onsets |
Numeric vector of onset times (in seconds). |
blockids |
Numeric vector of block numbers. |
durations |
Numeric vector of event durations (default is 1). |
subset |
Logical vector indicating which onsets to retain (default is NULL). |
A list with components:
varname: concatenated variable names,
events: a list of event objects,
subset: the retained onsets,
event_table: a tibble with event information,
onsets, blockids, durations.
x1 <- factor(rep(letters[1:3], 10))
x2 <- factor(rep(1:3, each = 10))
eterm <- event_term(list(x1 = x1, x2 = x2),
onsets = seq(1, 100, length.out = 30),
blockids = rep(1, 30))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.