Learn R Programming

brainGraph (version 1.0.0)

vertex_attr_dt: Create a data table with graph vertex measures

Description

This is just a helper function that creates a data.table in which each row is a vertex and each column is a different network measure (degree, centrality, etc.). It is partly a wrapper for as_data_frame.

Usage

vertex_attr_dt(g, group = NULL)

Arguments

g
An igraph graph object
group
A character string indicating group membership (default: NULL)

Value

A data table; each row is for a different vertex

See Also

vertex_attr, vertex_attr_names, as_data_frame

Examples

Run this code
## Not run: ------------------------------------
# dt.V <- vertex_attr_dt(g)
# setcolorder(dt.V, c('modality', 'atlas', 'Group', names(dt.V)[1:28]))
## ---------------------------------------------

Run the code above in your browser using DataLab