Skip to contents

Extracts descriptive statistics, for the whole-brain and subcortical region-of-interests (ROI), within a FreeSurfer subjects directory. It reads them from the aseg.stats file, as generated by the default FreeSurfer preprocessing pipeline.

Usage

fs_stats(sdirpath = "./", sublist, ROImeasure = "Volume_mm3")

Arguments

sdirpath

A string object indicating the path to the 'FreeSurfer' subjects directory. Default is the current working directory ("./").

sublist

A string object indicating the path to the subject list generated by SURFvextract as 'sublist.txt' (optional). This allows users to retrieve stats only from a selected list of subjects. The subject list is a list with 1 subject ID per line.

ROImeasure

A string object indicating what summary measure to extract for the subocrtical ROIs. Choices include: 'NVoxels', 'Volume_mm3', 'StructName', 'normMean', 'normStdDev', 'normMin', 'normMax', and 'normRange'. Default is 'Volume_mm3'.

Value

A data.frame object with N columns per aseg.stats measures and N row per subjects.

Examples

fs_stats(sdirpath="freesurfer_subjdir")
#> aseg.stats files could not be found in the set sdirpath