Skip to contents

Package Dependencies by Type

Usage

packageDependenciesByType(
  packages = NULL,
  db = utils::installed.packages(),
  which = c("Depends", "Imports", "LinkingTo", "Suggests", "Enhances")[1:3],
  recursive = TRUE,
  reverse = FALSE,
  verbose = FALSE
)

Arguments

packages

a character vector of package names.

db

character matrix as from available.packages() (with the default NULL the results of this call) or data frame variants thereof. Alternatively, a package database like the one available from https://cran.r-project.org/web/packages/packages.rds.

which

a character vector listing the types of dependencies, a subset of c("Depends", "Imports", "LinkingTo", "Suggests", "Enhances"). Character string "all" is shorthand for that vector, character string "most" for the same vector without "Enhances", character string "strong" (default) for the first three elements of that vector.

recursive

a logical indicating whether (reverse) dependencies of (reverse) dependencies (and so on) should be included, or a character vector like which indicating the type of (reverse) dependencies to be added recursively.

reverse

logical: if FALSE (default), regular dependencies are calculated, otherwise reverse dependencies.

verbose

logical indicating if output should monitor the package search cycles.