R packages can be complex bodies of code and functionality with hard-to-intuit underlying structure. pkgnet provides tools to analyze and understand that structure through the lens of network theory.

Package Report

The simplest way of using pkgnet is through the function CreatePackageReport, e.g.,

    CreatePackageReport("lubridate")

This will create a standalone HTML report containing analyses of various aspects of the specified subject package.

For more info, check out our introductory vignette with

    vignette("pkgnet-intro")

Individual Reporters

Reporters are the basic modules of functionality within pkgnet. Each type of reporter is used to analyze a particular aspect of the subject package. The currently available reporters are:

DependencyReporter

analyze the recursive network of packages that the subject package depends on.

FunctionReporter

analyze the network of interdependencies of the functions defined in the subject package

InheritanceReporter

analyze the class inheritance trees for subject packages that use object-oriented programming.

SummaryReporter

get an overview of the subject package through its DESCRIPTION file.

CreatePackageReport uses a standard set of reporters by default. You can customize the reporters you want by passing in your own list of instantiated reporters, e.g.


      CreatePackageReport(
          "lubridate",
          pkg_reporters = list(FunctionReporter$new(), InheritanceReporter$new())
      )
  

You can also use reporters interactively. Once you have a reporter instantiated, check our that reporter's documentation to see what you can do.


      reporter <- DependencyReporter$new()
      reporter$set_package("lubridate")
  

Author

Maintainer: Brian Burns brian.burns.opensource@gmail.com

Authors: