Learn R Programming

brainGraph (version 1.0.0)

plot_global: Plot global graph measures across densities

Description

Create a faceted line plot of global graph measures across a range of graph densities. Given a "tidied" data.table, you can choose to insert a dashed vertical line at a density of interest, rename the variable levels (which become the facet titles), exclude certain variables, and include a data.table of permutation data to add asterisks indicating signficant group differences.

Usage

plot_global(tidy.dt, xvar = c("density", "threshold"), vline = NULL,
  level.names = NULL, exclude = NULL, perms = NULL, g = NULL,
  alt = NULL)

Arguments

tidy.dt
A data.table that has been "tidied", containing global graph measures for all densities and subject groups
xvar
A character string indicating whether the variable of interest is "density" or "threshold" (e.g. with DTI data)
vline
Numeric; required to plot a dashed vertical line (default: NULL)
level.names
Character vector of facet label names, if you wish to change them (default: NULL)
exclude
Character vector of variables to exclude (default: NULL)
perms
A data.table of permutation group differences (default: NULL)
g
A list of lists of igraph graph objects; required if perms is provided (default: NULL)
alt
Character vector of alternative hypotheses; required if perms is provided, but defaults to "two.sided" for all variables

Value

A ggplot object