Learn R Programming

rtemis (version 0.79)

labels2niftis: Write Matrix to Multiple Nifti Files

Description

Writes matrix /data frame to nifti files columnwise. Each column of the matrix should correspond to the labels of a nifti file. i.e. nrow of matrix = n of labels in labeledNifti Niftis are written in parallel using parallel::parApply

Usage

labels2niftis(datamat, labeledNifti, prefix, verbose = TRUE,
  n.cores = parallel::detectCores())

Arguments

datamat

Matrix / Data Frame: Input

labeledNifti

String: Path to labeled nifti file

prefix

String: File output prefix

verbose

Logical: If TRUE, print messages to output

n.cores

Integer: Number of cores to use