Book Image

Mastering Data analysis with R

By : Gergely Daróczi
Book Image

Mastering Data analysis with R

By: Gergely Daróczi

Overview of this book

Table of Contents (19 chapters)
Mastering Data Analysis with R
Credits
www.PacktPub.com
Preface

Visualizing network data


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:

Tip

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, so the following examples repeated...