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")
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
|
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 | logical whether to convert the CIVET results into a |
QCDir | The directory, or vector of directories of where to find QC tables |
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)