Extract the packages dependencies, name of the dependency, operator and version
for each type and package of current repositories (getOptions("repos")
).
Arguments
- packages
a character vector of package names.
- which
a 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.
Value
A data.frame with 5 columns: the name of the dependency, the operator (op), the version it depends the type of dependency and the package.
Examples
rd <- repos_dependencies("BaseSet")
head(rd)
#> Package Type Name Op Version
#> 1 BaseSet Depends R >= 4.1.0
#> 2 BaseSet Imports dplyr >= 1.0.0
#> 3 BaseSet Imports methods <NA> <NA>
#> 4 BaseSet Imports rlang <NA> <NA>
#> 5 BaseSet Imports utils <NA> <NA>
#> 6 BaseSet Suggests Biobase <NA> <NA>