Number of elements in a ModelArray
nElements.RdReturns the number of elements (e.g., fixels or voxels) for a given scalar in a ModelArray. This is the row count of the scalar matrix.
Arguments
- x
A ModelArray object.
- scalar
Optional character string. Name of the scalar to query. Defaults to the first scalar in
names(scalars(x)).
Examples
if (FALSE) { # \dontrun{
ma <- ModelArray("data.h5", scalar_types = c("FD"))
nElements(ma)
nElements(ma, "FD")
} # }