An S3 class representing lazily accessed fMRI time series data. The
underlying data is stored in a lazy matrix (typically a delarr
object) with rows corresponding to timepoints and columns
corresponding to voxels.
Core interface for retrieving voxel time series from fMRI datasets.
Usage
fmri_series(
dataset,
selector = NULL,
timepoints = NULL,
output = c("fmri_series", "DelayedMatrix"),
event_window = NULL,
...
)Value
An object of class fmri_series
An fmri_series (with a delarr lazy matrix payload) or a
DelayedMatrix when output = "DelayedMatrix".
Details
An fmri_series object contains:
data: A lazy matrix with timepoints as rows and voxels as columnsvoxel_info: A data.frame containing spatial metadata for each voxeltemporal_info: A data.frame containing metadata for each timepointselection_info: A list describing how the data were selecteddataset_info: A list describing the source dataset and backend
See also
as.matrix.fmri_series for converting to standard matrix,
as_tibble.fmri_series for converting to tibble format
Examples
# \donttest{
# Create example fmri_series object
mat <- matrix(rnorm(100 * 50), nrow = 100, ncol = 50)
backend <- matrix_backend(mat, mask = rep(TRUE, ncol(mat)))
dataset <- fmri_dataset(backend, TR = 1, run_length = rep(25, 4))
fs <- fmri_series(dataset)
fs
#> <fmri_series> 50 voxels x 100 timepoints (lazy)
#> Selector: NULL | Backend: matrix_backend | Orientation: time x voxels
# }