Graphing R Package Dependencies

Kevin Feasel



Tomaz Kastrun uses the igraph package to graph package dependencies in R:

With importing package tools, we get many useful functions to find additional information on packages.

Function package.dependencies() parses and check dependencies of a package in current environment. Function package_dependencies()  (with underscore and not dot) will find all dependent and reverse dependent packages.

This probably tilts more toward “fun” than “practical,” but this will let you see the full set of dependencies for a package if, for example, you need to grab all of these packages for upgrading an offline instance.

Related Posts

Compacting Shared Libraries In R

Dirk Eddelbuettel compacts the tidyverse: Of course, there is a third way: just run strip --strip-debug over all the shared libraries after the build. As the path is standardized, and the shell does proper globbing, we can just do $ strip --strip-debug /usr/local/lib/R/site-library/*/libs/*.so using a double-wildcard to get all packages (in that R package directory) and all their shared […]

Read More

A dplyr Quiz

John Mount wants to know how well you understand dplyr: dplyr is one of the most popular R packages. It is powerful and important. But is it in fact easily comprehensible? dplyr makes sense to those of us who use it a lot. And we can teach part time R users a lot of the common good use patterns. But, is it an […]

Read More


March 2017
« Feb Apr »