Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sigmajs

Initialise


Description

Initialise a graph.

Usage

sigmajs(
  type = NULL,
  width = "100%",
  kill = FALSE,
  height = NULL,
  elementId = NULL
)

Arguments

type

Renderer type, one of canvas, webgl or svg.

width, height

Dimensions of graph.

kill

Whether to kill the graph, set to FALSE if using sigmajsProxy, else set to TRUE. Only useful in Shiny.

elementId

Id of elment.

Value

An object of class htmlwidget which renders the visualisation on print.

Note

Keep width at 100% for a responsive visualisation.

See Also

Examples

nodes <- sg_make_nodes()
edges <- sg_make_edges(nodes)

sigmajs("svg") %>%
  sg_nodes(nodes, id, label, size, color) %>%
  sg_edges(edges, id, source, target)

sigmajs

Interface to 'Sigma.js' Graph Visualization Library

v0.1.5
MIT + file LICENSE
Authors
John Coene [aut, cre, cph] (<https://orcid.org/0000-0002-6637-4107>)
Initial release
2020-06-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.