This is intended to replace
pkgDep in the miniCRAN package, but with modifications for speed.
It will first check local package directories in
libPath, and it if
the function cannot find the packages there, then it will use
pkgDep(packages, libPath, recursive = TRUE, depends = TRUE, imports = TRUE, suggests = FALSE, linkingTo = TRUE, repos = getOption("repos"))
a character vector of package names.
The library path where all packages should be installed, and looked for to load
Logical. Should dependencies of dependencies be searched, recursively. NOTE Dependencies of suggests will not be recursive. Default TRUE.
Logical. Include packages listed in "Depends". Default TRUE.
Logical. Include packages listed in "Imports". Default TRUE.
Logical. Include packages listed in "Suggests". Default FALSE.
Logical. Include packages listed in "LinkingTo". Default TRUE.
The remote repository (e.g., a CRAN mirror), passed to either
pkgDep will differ under the following
GitHub packages are not detected using
tools::package_dependencies does not detect the dependencies of base packages
among themselves, e.g.,
methods depends on
pkgDep("crayon")#> $crayon #>  "grDevices" "methods" "utils" "stats" "graphics" #>