Simplified file input for CBRAIN projects. Attempts to use as much information as possible from the directory structure and internal CBRAIN config files to find and read the correct CIVET results for CIVET 2.0.0 and 2.1.0

civet.readCBRAIN(path, prefix, subjects = NULL, atlas = "AAL",
  civetVersion = "2.1.0", readFiles = TRUE, readQC = TRUE,
  flatten = TRUE, QCDir = "QC")

Arguments

path

Path to the civet project

prefix

The prefix used to create the subject names

subjects

A character vector specifying which subjects to read in. If not specified, All files within path that don't match QC, scripts, stats, or analysis will be read in.

atlas

Either AAL (default), DKT, or a path to the specific atlas used

civetVersion

the version of CIVET used, either 2.1.0 (default) or 2.0.0

readFiles

logical whether or not to read the files into R or just generate the file names

readQC

logical whether to read and merge the QC results (must be used with flatten)

flatten

logical whether to convert the CIVET results into a dplyr compatible data frame or leave it in the legacy format

QCDir

The directory, or vector of directories of where to find QC tables

Value

A data.frame in the format of civet.getAllFilenames if readFiles is FALSE. A data.frame in the format of civet.readAllCivetFiles if readFiles is TRUE and flatten is FALSE. And a data.frame in the format of civet.flattenForDplyr if readQC, readFiles, and flatten are all TRUE (default)

See also