Skip to content

Extract dependency chains from pkg to deps.

Usage

pkg_deps_explain(pkg, deps, upgrade = TRUE, dependencies = NA)

Arguments

pkg

Package name or remote package specification.

deps

Package names of the dependencies to explain.

upgrade

Whether to use the most recent available package versions.

dependencies

Dependency types. See pkgdepends::as_pkg_dependencies() for possible values.

Value

A named list with a print method. First entries are the function arguments: pkg, deps, dependencies, the last one is paths and it contains the results in a named list, the names are the package names in deps.

Details

This function is similar to pkg_deps_tree(), but its output is easier to read if you are only interested is certain packages (deps).

Examples

if (FALSE) {
# How does the GH version of usethis depend on cli and ps?
pkg_deps_explain("r-lib/usethis", c("cli", "ps"))
}