Learn R Programming

brainGraph (version 0.48.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", "aal90", "brainsuite", "destrieux", "dk",
  "dk.scgm", "dkt", "dkt.scgm", "hoa112", "lpba40"), densities, datadir,
  modality = c("thickness", "volume", "lgi", "area"), use.mean = FALSE,
  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)
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:
  • atlasA character string of the brain atlas name
  • densitiesA numeric vector of the graph densities
  • modalityA character string of the modality you chose
  • kNumDensitiesAn integer indicating the number of densities
  • covarsA data.table of covariates
  • groupsA character vector of subject group names
  • kNumGroupsAn integer indicating the number of groups
  • kNumVerticesAn integer; the number of vertices in the graphs
  • lhrhA data.table of left- and right-hemispheric volumetric data
  • all.datA merged data.table of covars and lhrh

Details

The file containing covariates should be names covars.csv. 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
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)

Run the code above in your browser using DataLab