Add edge arrows to a directed graph. Due to complexities of writing custom renderers in webGL, we are stuck with one arrow:edge size ratio. In other words, you can only affect the edge arrow size by making the edges bigger.

addEdgeArrows(sigmaObj)

Arguments

sigmaObj

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

Value

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

Details

This is only applicable for directed graphs - if you run this on an undirected graph, you'll get an error.

Examples

library(igraph)
#> #> Attaching package: ‘igraph’
#> The following objects are masked from ‘package:stats’: #> #> decompose, spectrum
#> The following object is masked from ‘package:base’: #> #> union
library(sigmaNet) library(magrittr) g <- graph.formula(A-+B,B-+C,A-+C) layout <- matrix(c(2,1, 1,0, 3,0),byrow=TRUE,nrow=3) sig <- sigmaFromIgraph(g, layout = layout) sig %>% addEdgeSize(oneSize = 6) %>% addEdgeArrows()