Inspired by tools::package_dependencies, but with the added benefit
of recording the dependency type and relationships throughout the
dependency tree.
pkg_dependencies(
packages,
dependencies = TRUE,
db = available_packages(),
verbose = FALSE
)a character vector of package names.
A logical scalar, character string of
"all", "most", "hard" or "soft", NA or a vector of dependency
types compatible with as_pkg_dependencies() function.
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.
logical indicating if output should monitor the package search cycles.