Learn R Programming

brainGraph (version 0.72.0)

brainGraph_init: Initialize variables for further use in brainGraph

Description

This function initializes some variables that are important for further analysis with the brainGraph package. This mostly involves loading CSV files (of covariates/demographics, cortical thickness/volumes, etc.) and returning them as data tables.

Usage

brainGraph_init(atlas = c("aal116", "aal2.120", "aal2.94", "aal90", "brainsuite", "destrieux", "destrieux.scgm", "dk", "dk.scgm", "dkt", "dkt.scgm", "dosenbach160", "hoa112", "lpba40"), densities, datadir, modality = c("thickness", "volume", "lgi", "area"), use.mean = FALSE, covars = NULL, exclude.subs = NULL)

Arguments

atlas
A character string indicating which brain atlas you are using
densities
A numeric vector of the graph densities you would like to investigate
datadir
A character string; the filesystem location of your input files
modality
A character string indicating the volumetric MRI modality/measure you are using to create the graphs ('thickness', 'volume', 'lgi', or 'area')
use.mean
A logical indicating whether or not you would like to calculate the mean hemispheric volumetric measure (for later use in linear models) (default: FALSE)
covars
(optional) A data.table of covariates; specify this if you do not want to load your full covariates file (default: NULL)
exclude.subs
(optional) A character vector of the Study ID's of subjects who are to be excluded from the analysis

Value

A list containing: A list containing:

Details

The file containing covariates should be named covars.csv. However, you may also supply a data.table using the function argument covars. This is useful if you have multiple covariates in your file and wish to subset the data on your own.

The files containing volumetric data should include hemisphere, atlas, and modality, e.g. lh_dkt_thickness.csv. If you would like to include subcortical gray matter, then you will need files covars.scgm.csv and scgm.csv.

Examples

Run this code
## Not run: 
# init.vars <- brainGraph_init(atlas='dkt', densities=seq(0.07, 0.50, 0.01),
# datadir='/home/cwatson/Data', modality='thickness', exclude.subs=c('Con07',
# 'Con23', 'Pat15'), use.mean=FALSE)
# ## End(Not run)

Run the code above in your browser using DataLab