| group.morph.agg.standard | R Documentation |
Compute the mean (or other aggregates) over all vertices of a subject from standard space morphometry data (like 'surf/lh.area.fwhm10.fsaverage.mgh'). Uses knowledge about the FreeSurfer directory structure to load the correct file.
group.morph.agg.standard(
subjects_dir,
subjects_list,
measure,
hemi,
fwhm,
agg_fun = mean,
template_subject = "fsaverage",
format = "mgh",
cast = TRUE,
cortex_only = FALSE,
agg_fun_extra_params = NULL
)
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. |
measure |
string. Name of the vertex-wise measure of morphometry data file. E.g., "area" or "thickness". Used to construct the name of the morphometry file to be loaded. |
hemi |
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 |
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. |
cortex_only |
logical, whether to mask the medial wall, i.e., whether the morphometry data for all vertices which are not part of the cortex (as defined by the label file |
agg_fun_extra_params |
named list, extra parameters to pass to the aggregation function 'agg_fun' besides the loaded morphometry data. This is useful if you have masked the data and need to ignore NA values in the agg_fun. |
dataframe with aggregated values for all subjects, with 2 columns and n rows, where n is the number of subjects. The 2 columns are 'subject_id' and '<hemi>.<measure>' (e.g., "lh.thickness"), the latter contains the aggregated data.
Other global aggregation functions:
group.morph.agg.native(),
group.multimorph.agg.native(),
group.multimorph.agg.standard()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.