addNodeLabels: Modify the node labels of a 'sigmaNet' object.

Description Usage Arguments Value Examples

Description

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

Usage

1
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

 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

iankloo/sigmaNet documentation built on May 13, 2019, 1:37 a.m.