Generic for converting neuroimaging vectors to a memory-mapped
MappedNeuroVec on disk (when possible).
Methods for the as_mmap generic, which convert various
neuroimaging vector types to a MappedNeuroVec backed
by an on-disk NIfTI file.
as_mmap(x, file = NULL, ...)# S4 method for MappedNeuroVec
as_mmap(x, file = NULL, ...)
# S4 method for FileBackedNeuroVec
as_mmap(x, file = NULL, ...)
# S4 method for NeuroVec
as_mmap(x, file = NULL, data_type = "FLOAT", overwrite = FALSE, ...)
# S4 method for SparseNeuroVec
as_mmap(x, file = NULL, data_type = "FLOAT", overwrite = FALSE, ...)
A MappedNeuroVec (or x itself if already
memory-mapped).
A MappedNeuroVec (or x itself if it is
already memory-mapped).
A neuroimaging vector (NeuroVec, MappedNeuroVec,
or FileBackedNeuroVec).
Optional output file name. If NULL, a temporary file
with extension .nii is created.
Additional arguments passed to methods (e.g. data_type,
overwrite).
Character string specifying the output data type for the NIfTI file. Should be one of: "BINARY", "UBYTE", "SHORT", "INT", "FLOAT", "DOUBLE". Default is "FLOAT".
Logical; if TRUE, overwrite an existing file at the
specified path. Default is FALSE.