anatApply: Apply function over anat structure

anatApplyR Documentation

Apply function over anat structure

Description

This function is used to compute an arbitrary function of every region in an anat structure.

Usage

anatApply(vols, grouping = NULL, method = mean, ...)

Arguments

vols

anatomy volumes

grouping

a factor grouping with which to perform operations

method

The function which to apply [default mean]

...

Extra arguments to the function passed to method

Value

out: The output will be a single vector containing as many elements as there are regions in the input variable by the number of groupings

Examples

## Not run: 
getRMINCTestData() 
gf = read.csv("/tmp/rminctestdata/CIVET_TEST.csv")
gf = civet.getAllFilenames(gf,"ID","TEST","/tmp/rminctestdata/CIVET","TRUE","1.1.12")
gf = civet.readAllCivetFiles("/tmp/rminctestdata/AAL.csv",gf)
vm <- anatApply(gf$lobeThickness,gf$Primary.Diagnosis)

## End(Not run)

Mouse-Imaging-Centre/RMINC documentation built on Nov. 12, 2022, 1:50 p.m.