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

Making use of the igraph package to draw a network

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.

Getting ready

Install the igraph package:

install.packages("igraph")
library(igraph)

We will use the flo dataset showing the relationship between Renaissance Florentine families.

Marriage between Adimari and Cascioni families, ...

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