Learn R Programming

freesurferformats (version 1.1.0)

cifti.dense.structure.matrix: Get the dense data matrix of one structure for the user-facing readers.

Description

Workhorse of read.fs.morph.cifti and friends: like cifti.structure.data, but requires the structure to have a surface part and returns the per-vertex matrix directly. This keeps the user-facing functions working for the structures they support today, and turns the unsupported ones into a descriptive error.

Usage

cifti.dense.structure.matrix(x, structure)

Value

a numeric matrix, one row per surface vertex, one column per index of the other matrix dimension.

Arguments

x

an fs.cifti.data object, a file path or an fs.cifti object, see cifti.structure.data.

structure

character string, the canonical name of the brain structure.