This function is used to compute an arbitrary function of every region in an anat structure.
anatApply(vols, grouping, method = mean)
vols | anatomy volumes |
---|---|
grouping | grouping with which to perform operations |
method | The function which to apply [default mean] |
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
# 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) # }