The R package igraph is very useful. However, its …