Learn R Programming

⚠️There's a newer version (2.1.2) of this package.Take me there.

visNetwork

R package, using vis.js library for network visualization. visNetwork is now available on CRAN.

Online documentation

http://datastorm-open.github.io/visNetwork

And have a look to multiple R examples, vis.js documentation (visDocumentation).

News

2.0.0 available on CRAN

  • Add support for edges color/label using highlightNearest/selectedBy

  • New collapse features (?visOptions)

  • New proxy methods : visGetBoundingBox, visGetConnectedEdges, visGetConnectedNodes, visGetEdges, visGetNodes, visGetPositions, visGetScale, visGetSelectedEdges, visGetSelectedNodes, visGetSelection, visGetViewPosition

  • init visTree, to visualize rpart object, visTreeEditor and visTreeModuleServer

Example

install.packages("visNetwork")

# devtools::install_github("datastorm-open/visNetwork") for development version

require(visNetwork)
?visNetwork

# minimal example
nodes <- data.frame(id = 1:3)
edges <- data.frame(from = c(1,2), to = c(1,3))
visNetwork(nodes, edges)

# vignette
vignette("Introduction-to-visNetwork")

# full javascript documentation
visDocumentation()

# shiny example
shiny::runApp(system.file("shiny", package = "visNetwork"))

Copy Link

Version

Install

install.packages('visNetwork')

Monthly Downloads

40,019

Version

2.0.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Last Published

July 30th, 2017

Functions in visNetwork (2.0.1)

visConfigure

Network visualization configure options
visDocumentation

View full documentation of vis.js on network
visClusteringByConnection

Network visualization clustering options - by node id
visClusteringByGroup

Network visualization clustering options - by group
visClusteringByHubsize

Network visualization clustering options - by hubsize
visClusteringOutliers

Network visualization clustering options - outliers
addExport

addFontAwesome

Use fontAwesome icons in visNetwork graph
addIonicons

Use Ionicons in visNetwork graph
visClusteringByColor

Network visualization clustering options - by color
visGetConnectedEdges

Method getConnectedEdges, with shiny only.
visGetConnectedNodes

Method getConnectedNodes, with shiny only.
visGetEdges

Function to get edges data, with shiny only.
visGetNodes

Function to get nodes data, with shiny only.
visGetPositions

Network visualization getPositions method
visGetScale

Function to get current scale of network, with shiny only.
visFocus

Network visualization focus method
visGetBoundingBox

Method getBoundingBox, with shiny only.
visGetSelection

Function to get selected edges & nodes, with shiny only.
visEdges

Network visualization edges options
visEvents

Network visualization events
visGetSelectedEdges

Function to get selected edges, with shiny only.
visGetSelectedNodes

Function to get selected nodes, with shiny only.
visNetwork-collapse

Network visualization collapse / uncollapsed method
%>%

Export magrittr function
visSave

Save a a visNetwork object to an HTML file
visSelectEdges

Function to select edge(s) from network, with shiny only.
visGetViewPosition

Function to get current view position, with shiny only.
visMoveNode

Network visualization moveNode method
visNearestNodes

Function to nearest nodes of a target node, with shiny only.
visNodes

Network visualization nodes options
visLayout

Network visualization layout options
visLegend

Add a legend on a visNetwork object
visRemoveEdges

Function to remove edges from network, with shiny only.
visOptions

Network visualization general options
visStartSimulation

Network visualization startSimulation method
visStopSimulation

Network visualization stopSimulation method
visSetOptions

Network visualization full options setter
visSetSelection

Function to select edge(s) / node(s) from network, with shiny only.
visRemoveNodes

Function to remove nodes from network, with shiny only.
visTreeEditor

Run and edit a visTree, and get back in R
visUnselectAll

Network visualization unselectAll method
visGroups

Network visualization groups options
visHierarchicalLayout

Network visualization Hierarchical layout options
visNetwork-igraph

Render a visNetwork object from an igraph object
visNetwork-shiny

Shiny bindings for visNetwork
visSelectNodes

Function to select node(s) from network, with shiny only.
visSetData

Network visualization setData method
visStorePositions

Method storePositions, with shiny only.
visExport

Network export configuration
visFit

Network visualization fit method
visIgraphLayout

Use a igraph layout for compute coordinates & fast rendering
visInteraction

Network visualization interaction
visNetwork-treeModule

Module shiny for visualize and customize a rpart tree
visNetwork

Network visualization
visTree

Visualize Recursive Partitioning and Regression Trees (rpart object)
visPhysics

Network visualization Physics options
visRedraw

Network visualization redraw method
visSetTitle

Set title, subtitle, and footer using visNetworkProxy
visStabilize

Network visualization stabilize method
visUpdateEdges

Function to update the information of edges, with shiny only.
visUpdateNodes

Function to update the information of nodes, with shiny only.