View source: R/event-classes.R
event_variable | R Documentation |
This is a user-facing wrapper around the internal event()
constructor,
specifically for creating continuous event sequences from numeric vectors.
event_variable(vec, name, onsets, blockids = 1, durations = 0, subset = NULL)
vec |
Numeric vector representing continuous event values. |
name |
Name of the event variable. |
onsets |
Numeric vector of event onsets (seconds). |
blockids |
Numeric vector of block IDs. |
durations |
Numeric vector of event durations (seconds), or a scalar. |
subset |
Optional logical vector indicating which events to keep. If
provided, the vector must match |
An S3 object of class event
and event_seq
.
event_factor
evar <- event_variable(c(1, 2, 3, 4, 5, 6), "example_var", onsets = seq(1, 100, length.out = 6))
print(evar)
is_continuous(evar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.