The
igraph
package is a reference point for network visualization in the R environment.
igraph
is actually more than an R package, since you can use igraph
tools even with Python and C/C++.
If you are performing analysis that involves network visualizations and R, you should look at this package as one of your more relevant allies.
This recipe will let you enter the wide world of network visualization with R, showing you how to create a network plot starting from a data frame.
Install the igraph
package:
install.packages("igraph") library(igraph)
We will use the flo
dataset showing the relationship between Renaissance Florentine families.
This dataset is provided as an adjacency matrix within the network package.
Therefore, in order to make it available, we have to install the network
package and load the dataset by running the data()
function...