sg_from_igraph: Create from igraph

Description Usage Arguments Value Examples

View source: R/from_igraph.R

Description

Create a sigmajs from an igraph object.

Usage

1
sg_from_igraph(sg, igraph, layout = NULL, sd = NULL)

Arguments

sg

An object of class sigmajsas intatiated by sigmajs.

igraph

An object of class igraph.

layout

A matrix of coordinates.

sd

A SharedData of nodes.

Value

A modified version of the sg object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
data("lesmis_igraph")

layout <- igraph::layout_with_fr(lesmis_igraph)

sigmajs() %>%
	sg_from_igraph(lesmis_igraph, layout) %>%
	sg_settings(defaultNodeColor = "#000")

## End(Not run)

JohnCoene/sigmajs documentation built on Feb. 1, 2021, 12:12 p.m.