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

visSave

Save a a visNetwork object to an HTML file


Description

Save a a visNetwork object to an HTML file for sharing with others. The HTML can include it's dependencies in an adjacent directory or can bundle all dependencies into the HTML file (via base64 encoding).

Usage

visSave(graph, file, selfcontained = TRUE, background = "white")

Arguments

graph

: a visNetwork object

file

: File to save HTML into. See saveWidget

selfcontained

: Whether to save the HTML as a single self-contained file (with external resources base64 encoded) or a file with external resources placed in an adjacent directory.

background

: Text string giving the html background color of the widget. Defaults to white.

References

See Also

Examples

## Not run: 

nodes <- data.frame(id = 1:3, group = c("B", "A", "B"))
edges <- data.frame(from = c(1,2), to = c(2,3))

network <- visNetwork(nodes, edges)
network

network 

# same as
visSave(network, file = "network.html", background = "black")


## End(Not run)

visNetwork

Network Visualization using 'vis.js' Library

v2.0.9
MIT + file LICENSE
Authors
Almende B.V. [aut, cph] (vis.js library in htmlwidgets/lib, http://visjs.org, http://www.almende.com/home), Benoit Thieurmel [aut, cre] (R interface), Titouan Robert [aut, ctb]
Initial release

We don't support your browser anymore

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