Extract the packages dependencies, name of the dependency, operator and version
for each type and package of current repositories (getOptions("repos")
).
Arguments
- 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()
#> Retrieving repos_dependencies, this might take a bit.
#> Caching results to be faster next call in this session.
head(rd)
#> name op version type package
#> 1 R >= 3.6.0 Depends AATtools
#> 2 doParallel <NA> <NA> Imports AATtools
#> 3 dplyr <NA> <NA> Imports AATtools
#> 4 foreach <NA> <NA> Imports AATtools
#> 5 magrittr <NA> <NA> Imports AATtools
#> 6 R >= 3.1.0 Depends ABACUS