View source: R/event-classes.R
event_basis | R Documentation |
This is a user-facing wrapper around the internal event()
constructor,
specifically for creating event sequences modulated by a basis set.
event_basis(
basis,
name = NULL,
onsets,
blockids = 1,
durations = 0,
subset = NULL
)
basis |
A |
name |
Optional name for the event variable. If NULL, uses |
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
.
basis <- BSpline(1:21, 3)
onsets <- seq(0, 20, length.out = 21)
blockids <- rep(1, length(onsets))
ebasis <- event_basis(basis, onsets=onsets, blockids=blockids)
print(ebasis)
levels(ebasis)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.