Get Network Representation of an R Package

Tools from the domain of graph theory can be used to quantify the complexity and vulnerability to failure of a software package. That is the guiding philosophy of this package. 'pkgnet' provides tools to analyze the dependencies between functions in an R package and between its imported packages.

CRAN_Status_Badge CRAN_Download_Badge Build Status codecov


pkgnet is an R library designed for the analysis of R libraries! The goal of the package is to build a graph representation of a package and its dependencies to inform a variety of activities, including:

  • prioritizing functions to unit test based on their centrality
  • examining the recursive dependencies you are taking on by using a given package
  • exploring the structure of a new package provided by a coworker or downloaded from the internet

Table of contents

  1. How it Works
  2. Installation
  3. Usage Examples
  4. How to Contribute
  5. Next Steps

How it Works

The core functionality of this package is the CreatePackageReport function.


This package is now available from CRAN!


Usage Examples

Try it out!

result <- CreatePackageReport('ggplot2')

How to Contribute

To report bugs, request features, or ask questions about the structure of the code, please open an issue.

If you'd like to contribute to the project, please open a pull request. PRs should follow the project's contribution guidelines.

Next Steps

This is a fairly new project and, as the version number indicates, should be regarded as a work in progress.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.3.2 by Brian Burns, a month ago

Report a bug at

Browse source code at

Authors: Brian Burns [aut, cre] , James Lamb [aut] , Patrick Boueri [ctb] , Jay Qi [aut]

Documentation:   PDF Manual  

BSD_3_clause + file LICENSE license

Imports assertthat, covr, data.table, DT, futile.logger, igraph, knitr, magrittr, methods, R6, rmarkdown, tools, visNetwork

Suggests devtools, testthat, withr

Suggested by getTBinR.

See at CRAN