Learn R Programming

sigmaNet (version 1.1.0)

saveSigma: Save 'sigmaNet' object as html - a wrapper for saveWidget()

Description

Save an 'sigmaNet' object as an html file (without rendering it). This is especially helpful when dealing with very large graphs that could crash your R session if you attempt to render them in the 'Rstudio' viewer pane.

Usage

saveSigma(sigmaObj, fileName = NULL)

Arguments

sigmaObj

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

fileName

A name for your html output (with or without .html at the end)

Value

An html file in your working directory (or other specified directory). This file is a standalone representation of your 'Sigma.js' visualization that can be shared and moved freely. This object will maintain it's interactivity.

Examples

Run this code
# NOT RUN {
library(igraph)
library(sigmaNet)
library(magrittr)

data(lesMis)

l <- layout_nicely(lesMis)
sig <- sigmaFromIgraph(graph = lesMis, layout = l)

# }
# NOT RUN {
saveSigma(sig, fileName = file.path(tempdir(), 'myFile.html'))
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab