addEdgeSize: Modify the edge size of a 'sigmaNet' object.

Description Usage Arguments Details Value Examples

View source: R/sigmaAttrs.R

Description

Modify the edge size of a 'sigmaNet' object by providing one of the following: (1) a single size to use for all edges; or (2) an attribute in the initial igraph to be used to size the edges.

Usage

1
2
addEdgeSize(sigmaObj, sizeAttr = NULL, minSize = 1, maxSize = 5,
  oneSize = NULL)

Arguments

sigmaObj

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

sizeAttr

The attribute to use to create edge size (width)

minSize

The minimum size of the edges (for scaling)

maxSize

The maximum size of the edges (for scaling)

oneSize

A single size to use for all edges

Details

If the 2nd method is used, the minSize and maxSize attribute will control lower and upper bounds of the scaling function.

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
11
12
13
14
15
16
17
library(igraph)
library(sigmaNet)
library(magrittr)

data(lesMis)

l <- layout_nicely(lesMis)

#specify a single edge size
sig <- sigmaFromIgraph(graph = lesMis, layout = l) %>%
  addEdgeSize(oneSize = 5)
sig

#specify an attribute and min/max
sig <- sigmaFromIgraph(graph = lesMis, layout = l) %>%
  addEdgeSize(sizeAttr = 'value', minSize = .1, maxSize = 2)
sig

sigmaNet documentation built on May 2, 2019, 11:06 a.m.