Creating a dynamic force network with the visNetwork package
The visNetwork
package is one among the most popular packages in the R community, mainly because it lets you display networks and interact with them without having to invest too much time.
This recipe will get you up and running with this package, showing you all that you need to know to start exploring your network in a fully interactive way.
Getting ready
In order to get started with this recipe, you will need to install and load the visNetwork
package to actually produce your network visualizations.
We will also use the jsonlite
package to parse the dataset we will use from the JSON format to the data frame:
install.packages(c("visnetwork","jsonlite")) library(visnetwork) library(jsonlite) ...
Get RStudio for R Statistical Computing Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.