pkgDepMetrics: Report package dependency burden

Description Usage Arguments Value Author(s) Examples

View source: R/pkgDependencyMetrics.R

Description

Elaborate a report on the dependency burden of a given package.

Usage

1
pkgDepMetrics(pkg, depdf)

Arguments

pkg

character() name of the package for which we want to obtain metrics on its dependency burden.

depdf

a tidy data frame with package dependency information obtained through the function buildPkgDependencyDataFrame.

Value

A tidy data frame with different metrics on the package dependency burden. More concretely, the following columns:

The reported information is ordered by the Usage column to facilitate the identification of dependencies for which the analyzed package is using a small fraction of their functionality and therefore, it could be easier remove them. To aid in that decision, the column DepOverlap reports the overlap of the dependency graph of each dependency with the one of the analyzed package. Here a value above, e.g., 0.5, could, albeit not necessarily, imply that removing that dependency could substantially lighten the dependency burden of the analyzed package.

An NA value in the ImportedAndUsed column indicates that the function pkgDepMetrics() could not identify what functionality calls in the analyzed package are made to the dependency.

Author(s)

Robert Castelo

Charlotte Soneson

Examples

1
2
3
4
5
depdf <- buildPkgDependencyDataFrame(
  dependencies=c("Depends", "Imports"), 
  repo=c("BioCsoft", "CRAN")
)
pkgDepMetrics('BiocPkgTools', depdf)

BiocPkgTools documentation built on April 15, 2021, 6:01 p.m.