Package dependencies from DESCRIPTION files with installed or expected versions or newest released.
pac_deps(
pac,
fields = c("Depends", "Imports", "LinkingTo"),
lib.loc = .libPaths(),
base = FALSE,
local = TRUE,
description_v = FALSE,
attr = TRUE,
recursive = TRUE,
repos = biocran_repos()
)
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: TRUE
logical
if the dependencies version should be taken from description files, minimal required. By default installed versions are taken. Default: FALSE
logical
if a package and its version should be added as an attribute of data.frame or for FALSE as an additional record. Default: TRUE
logical
if to assess the dependencies recursively. Default: TRUE
character
vector of repositories URLs to use. By default checking CRAN and newest Bioconductor per R version. Default pacs::biocran_repos()
data.frame
with packages and their versions. Versions are taken from installed.packages
or newest released.
When function is invoked in the loop afterwards results could be aggregated like,
stats::aggregate(results[, c("Version"), drop = FALSE], list(Package = results$Package), pacs::compareVersionsMax)
.
if (FALSE) { # \dontrun{
pacs::pac_deps("stats", base = TRUE)$Package
pacs::pac_deps("memoise")$Package
pacs::pac_deps("memoise", description_v = FALSE)
# raw dependencies from DESCRIPTION file
pacs::pac_deps("memoise", description_v = TRUE, recursive = FALSE)
# raw dependencies from DESCRIPTION file - last release
pacs::pac_deps("memoise", description_v = TRUE, local = FALSE, recursive = FALSE)
} # }