add_node_labels | R Documentation |
Modify the node labels of an existing sgraph object by providing an attribute from the initial igraph to use as the labels.
add_node_labels(sigma_obj, label_attr = NULL)
sigma_obj |
sgraph object, returned by sigma_from_igraph function |
label_attr |
Attribute to use to replace node labels |
sgraph object with modified node labels
library(igraph)
library(sgraph)
data(lesMis)
sig <- sigma_from_igraph(igraph = lesMis) %>%
add_node_labels(label_attr = 'label')
sig
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.