as.matrix_ifti {fMRItools} | R Documentation |
Convert CIFTI, NIFTI, or GIFTI input to T \times V
matrix
Description
Convert CIFTI, NIFTI, or GIFTI input to a T \times V
matrix by
reading it in with the corresponding package and then separating the data
from the metadata. Also works with the intermediate R objects created from
reading these files: "xifti"
objects from ciftiTools
,
"gifti"
objects from gifti
,
"nifti"
or "niftiExtension"
objects from oro.nifti
, and
"niftiImage"
objects from RNifti
.
For CIFTI files, only intents supported by ciftiTools
are supported:
dscalar
, dtseries
, and dlabel
. For NIFTI file or
NIFTI-intermediate R objects, the data will be vectorized/masked.
Usage
as.matrix_ifti(
x,
meta = FALSE,
sortSub = FALSE,
TbyV = TRUE,
verbose = FALSE,
...
)
Arguments
x |
The object to coerce to a matrix |
meta |
Return metadata too? Default: |
sortSub |
For CIFTI format input only. Sort subcortex by labels?
Default: |
TbyV |
Return the data matrix in |
verbose |
Print updates? Default: |
... |
If |
Value
If !meta
, x
as a matrix. If meta
, a list of
length two: the first entry is x
as a matrix, and the second entry is
the metadata of x
.