O'Reilly logo

RStudio for R Statistical Computing Cookbook by Andrea Cirillo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required