Skip to contents

Assigns a color to each node of a multilayer network depending of their taxonomic level, for example, the phylum.

Usage

v_colored_ml (g.list, T_table, g_tax, p_tax, g_colors)

Arguments

g.list

List of igraph objects (multilayer network).

T_table

Taxa table (as data.frame).

g_tax

The taxonomic level at which the nodes will be colored.

p_tax

The taxonomic level at which the network was built.

g_colors

Set of colors. The vector must have the same length of g_tax elements.

Value

An igraph object.

See also

Examples


library(seqtime)
# Loads this library to create a vector with colors
library (viridis)

data("mlnet_dstoolAB")

g <- v_colored_ml (g.list = mlnet_dstoolAB, T_table = david_stool_lineages, g_tax = "Order", p_tax = "Genus", g_colors = c)
#> Error in `[.data.frame`(T_table, , g_tax): undefined columns selected