Overview

HTTPS SSH

sigmajs

Travis-CI Build Status AppVeyor Build Status lifecycle bitbucket CRAN status CircleCI

sigmajs

sigmajs for R.

With the rise in popularity of networks, it is important for R users to have access to a package that allows visualising the aforementioned networks in a highly configurable, interactive and dynamic manner. sigmajs is Shiny-centric in order to best leverage the original library's great many methods.

All graphs must be initialised with the sigmajs() function, all the functions of the 📦 start with sg_ and its proxies end in _p, functions are pipe-friendly (%>%). All events can be captured in Shiny.

Note that the graphs may not work in RStudio viewer, open them in your browser of choice

Install

# install.packages("devtools")
devtools::install_github("JohnCoene/sigmajs") # github
devtools::install_bitbucket("sigmajs", "JohnCoene") # bitbucket

Examples

Most functions have corresponding demo(), see documentation and shiny demo

library(sigmajs)

# generate data
nodes <- sg_make_nodes()
edges <- sg_make_edges(nodes)

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

# from igraph 
data("lesmis_igraph")

layout <- igraph::layout_with_fr(lesmis_igraph)

sigmajs() %>%
    sg_from_igraph(lesmis_igraph, layout)

# from GEXF
gexf <- system.file("examples/arctic.gexf", package = "sigmajs")

sigmajs() %>% 
    sg_from_gexf(gexf) 

# proxies demos
demo(package = "sigmajs")