Modify the node labels of an existing 'sigmaNet' object by providing an attribute from the initial 'igraph' to use as the labels.

addNodeLabels(sigmaObj, labelAttr = NULL)

Arguments

sigmaObj

A 'sigmaNet' object - created using the 'sigmaFromIgraph' function

labelAttr

The attribute to use to create node labels

Value

A 'sigmaNet' object with modified node labels. This object can be called directly to create a visualization, or modified by additional functions.

Examples

library(igraph) library(sigmaNet) library(magrittr) data(lesMis) l <- layout_nicely(lesMis) sig <- sigmaFromIgraph(graph = lesMis, layout = l) %>% addNodeLabels(labelAttr = 'label') sig