Description Usage Arguments Value Examples
Modify the node labels of an existing 'sigmaNet' object by providing an attribute from the initial 'igraph' to use as the labels.
1 | addNodeLabels(sigmaObj, labelAttr = NULL)
|
sigmaObj |
A 'sigmaNet' object - created using the 'sigmaFromIgraph' function |
labelAttr |
The attribute to use to create node labels |
A 'sigmaNet' object with modified node labels. This object can be called directly to create a visualization, or modified by additional functions.
1 2 3 4 5 6 7 8 9 10 | library(igraph)
library(sigmaNet)
library(magrittr)
data(lesMis)
l <- layout_nicely(lesMis)
sig <- sigmaFromIgraph(graph = lesMis, layout = l) %>%
addNodeLabels(labelAttr = 'label')
sig
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.