event_matrix | R Documentation |
This function generates a continuous valued event set object from a given matrix. It is useful for creating event sequences with multiple continuous predictors for fMRI data analyses.
event_matrix(mat, name, onsets, blockids = rep(1, ncol(mat)), durations = NULL)
mat |
A matrix of continuous event sequence values, with one row per event |
name |
A character string providing a name for the event set |
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) |
An object representing the continuous valued event set, with class "event_matrix" and "event_seq"
mat <- matrix(rnorm(200), 100, 2)
onsets <- seq(1, 1000, length.out=100)
durations <- rep(1, 100)
blockids <- rep(1, 100)
eset <- event_matrix(mat, "eset", onsets, durations, blockids)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.