-
Book Overview & Buying
-
Table Of Contents
Mastering Data analysis with R
By :
To compare these two metrics, let's draw a simple scatter plot showing each R package by degree and betweenness:
> plot(degree(g), betweenness(g), type = 'n', + main = 'Centrality of R package dependencies') > text(degree(g), betweenness(g), labels = V(g)$name)

Relax; we will be soon able to generate much more spectacular and instructive plots in a few minutes! But the preceding plot shows that there are some packages with a rather low number of direct dependents that still have a great impact on the global R ecosystem.
Before we proceed, let's filter our dataset and graph to include far fewer vertices by building the dependency tree of the igraph package, including all packages it depends on or imports from:
The following short list of igraph dependencies was generated in April 2015. Since then, a major new version of igraph has been released with a lot more dependencies due to importing from the magrittr and NMF packages,...
Change the font size
Change margin width
Change background colour