Skip to contents

Extracts a subset of data from a sparse four-dimensional brain image based on provided indices.

Usage

# S4 method for class 'AbstractSparseNeuroVec,numeric,numeric,ANY'
x[i, j, k, m, ..., drop = TRUE]

Arguments

x

An object of class AbstractSparseNeuroVec

i

Numeric vector specifying the indices for the first dimension

j

Numeric vector specifying the indices for the second dimension

k

Numeric vector specifying the indices for the third dimension (optional)

m

Numeric vector specifying the indices for the fourth dimension (optional)

...

Additional arguments passed to methods

drop

Logical indicating whether to drop dimensions of length one (default: TRUE)

Value

An array containing the extracted subset

Examples

if (FALSE) { # \dontrun{
# Assuming 'sparse_vec' is a valid SparseNeuroVec object
subset <- sparse_vec[1:10, 1:10, 1:5, 1:100]
} # }