set_graph_colors: Color graph vertices and edges

Description Usage Arguments Value

View source: R/set_brainGraph_attributes.R

Description

set_graph_colors takes an integer vector representing membership of some grouping (e.g., a community or connected component) and creates a character vector of colors for each grouping. Isolated vertices will be colored gray. Edges are assigned the same color if connected to vertices in the same group, and assigned gray otherwise.

Usage

1

Arguments

g

An igraph graph object

name

Character string of the name of the attribute to add

memb

An integer vector representing membership of e.g. a community

Value

The same graph with additional vertex and edge attributes


brainGraph documentation built on Oct. 23, 2020, 6:37 p.m.