contract_brainGraph: Contract graph vertices based on brain lobe and hemisphere

View source: R/contract_brainGraph.R

contract_brainGraphR Documentation

Contract graph vertices based on brain lobe and hemisphere

Description

Create a new graph after merging vertices within specified groups. By default, groups are brain lobe and hemisphere membership.

Usage

contract_brainGraph(g, vgroup = "lobe.hemi")

Arguments

g

A brainGraph graph object

vgroup

Character string; the name of the vertex attribute to use when contracting the graph. Default: 'lobe.hemi'

Details

The size vertex-level attribute of the resultant graph is equal to the number of vertices in each group. The x-, y-, and z-coordinates of the new graph are equal to the mean coordinates of the vertices per group. The new edge weights are equal to the number of inter-group connections of the original graph.

Value

A new brainGraph graph object with vertex-level attributes representing the mean spatial coordinates, and vertex- and edge-level attributes of color names

Author(s)

Christopher G. Watson, cgwatson@bu.edu

See Also

contract


cwatson/brainGraph documentation built on Feb. 21, 2024, 6:33 p.m.