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

Description Usage Arguments Value Examples

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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'))

## End(Not run)

iankloo/sigmaNet documentation built on May 13, 2019, 1:37 a.m.