assign_lobes: Give vertices in a graph a lobe attribute.
Description
This function will assign vertex attributes lobe and lobe.hemi
for all vertices in a graph, given a specific atlas. It will also add an
attribute circle.layout for plotting circular graphs.
Usage
assign_lobes(g, atlas.dt, rand = FALSE)
Arguments
g
An igraph graph object.
atlas.dt
A data table for a specific atlas.
rand
A character string indicating whether this function is being run
for a random graph or a "graph of interest" (default: FALSE).
Value
An igraph graph object with additional vertex attributes:
lobeCharacter string indicating the lobe
lobe.hemiInteger vector indicating the lobe and hemisphere
circle.layoutInteger vector for ordering the vertices for circle
plots