Companion R package for the igraph book