graph.color.vertices: Assign vertex colors to a graph

Description Usage Arguments Value

Description

A convenience function to add colors to a graph of the igraph format based on a vector of vertex attributes.

Usage

1
graph.color.vertices(g, attribute, pallete = NULL)

Arguments

g

A graph object in the igraph format

attribute

A vertex attribute to organize the colors. Either use a categorical vector (factor, character) to color categories in different colors, or use a numerical vector (numerical, integer) to highlight with one color (like a heat map)

pallete

Optional. Add a custom pallete, which should be a character vector with color codes that igraph can use.

Value

A graph object in the igraph format


kasperwelbers/network-tools documentation built on May 20, 2019, 7:38 a.m.