Learn R Programming

brainGraph (version 2.7.3)

DataTables: Create a data table with graph global and vertex measures

Description

graph_attr_dt is a helper function that takes a list of graphs and creates a data.table of global measures for each graph. Each row will be for a different graph.

vertex_attr_dt is 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

graph_attr_dt(g.list, group = NULL)

vertex_attr_dt(g, group = NULL)

Arguments

g.list

A list of igraph graph objects

group

A character string indicating group membership (default: NULL)

g

An igraph graph object

Value

A data.table

See Also

graph_attr, graph_attr_names

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