fsbrain (version 0.0.2)

group.multimorph.agg.standard: Aggregate standard space (fsaverage) morphometry data for multiple measures over hemispheres for a group of subjects.

Description

Compute the mean (or other aggregates) over all vertices of a subject from standard space morphometry data (like 'surf/lh.area.fwhm10.fsaverage.mgh'). You can specify several measures and hemispheres. Uses knowledge about the FreeSurfer directory structure to load the correct files.

Usage

group.multimorph.agg.standard(subjects_dir, subjects_list, measures, hemis,
  fwhm, agg_fun = mean, template_subject = "fsaverage",
  format = "mgh", cast = TRUE)

Arguments

subjects_dir,

string. The FreeSurfer SUBJECTS_DIR, i.e., a directory containing the data for all your subjects, each in a subdir named after the subject identifier.

subjects_list,

string vector. A vector of subject identifiers that match the directory names within subjects_dir.

measures,

vector of strings. Names of the vertex-wise morphometry measures. E.g., c("area", "thickness"). Used to construct the names of the morphometry file to be loaded.

hemis,

string, one of 'lh', 'rh' or 'both'. The hemisphere name. Used to construct the names of the annotation and morphometry data files to be loaded.

fwhm,

string. Smoothing as string, e.g. '10' or '25'.

agg_fun,

function. An R function that aggregates data, typically max, mean, min or something similar. Note: this is NOT a string, put the function name without quotes. Defaults to mean.

template_subject,

string. Template subject name, defaults to 'fsaverage'.

format,

string. One of 'mgh', 'mgz', 'curv'. Defaults to 'mgh'.

cast,

Whether a separate 'hemi' column should exist.

Value

dataframe with aggregated values over all measures and hemis for all subjects, with m columns and n rows, where n is the number of subjects. The m columns are 'subject_id' and '<hemi>.<measure>' (e.g., "lh.thickness") for all combinations of hemi and measure, the latter contains the aggregated data.

See Also

Other global aggregation functions: group.morph.agg.native, group.morph.agg.standard, group.multimorph.agg.native