This method realizes the underlying lazy matrix and returns an ordinary matrix with timepoints in rows and voxels in columns.
Usage
# S3 method for class 'fmri_series'
as.matrix(x, ...)See also
fmri_series for the class definition,
as_tibble.fmri_series for tibble conversion
Examples
# \donttest{
# Create small example
mat <- matrix(rnorm(20), nrow = 4, ncol = 5)
backend <- matrix_backend(mat, mask = rep(TRUE, ncol(mat)))
dataset <- fmri_dataset(backend, TR = 1, run_length = nrow(mat))
fs <- fmri_series(dataset)
# Convert to matrix
mat_result <- as.matrix(fs)
dim(mat_result) # 4 x 5
#> [1] 4 5
# }