A higher-level function, build from pacs::pacs_deps and tools::package_dependencies.
A tool to identify a main sources of dependencies, which direct dependencies are the heaviest one.
pac_deps_heavy(
pac,
fields = c("Depends", "Imports", "LinkingTo"),
lib.loc = .libPaths(),
base = FALSE,
local = FALSE,
repos = pacs::biocran_repos()
)data.frame with three columns c("Package", "NrDeps", "NrUniqueDeps"): package name, number of dependencies and number of unique dependencies (not shared by other direct dependencies).
character a package name.
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.
Default: c("Depends", "Imports", "LinkingTo")
character vector of search paths with local packages. Default: .libPaths()
logical if to add base packages too. If TRUE then pacs::pacs_base() are taken into account. Default: FALSE
logical if to use local repository (or newest remote packages). Default: FALSE
character vector of repositories URLs to use. By default checking CRAN and newest Bioconductor per R version. Default pacs::biocran_repos()
if (FALSE) {
pacs::pac_deps_heavy("caret")
pacs::pac_deps_heavy("dplyr")
}
Run the code above in your browser using DataLab