Get all dependencies

get_all_dependencies(packages, level = 1L, relation = c("Depends",
  "Imports", "LinkingTo", "Suggests", "Enhances"), strict = FALSE,
  ignore = c("datasets", "utils", "grDevices", "graphics", "stats",
  "methods"))

Arguments

packages

(non-empty character vector) Package names

level

(positive integer, Default = 1L) Depth of recursive dependency

relation

(character vector) Types of relations. Must be a subset of c("Depends", "Imports", "LinkingTo", "Suggests", "Enhances")

strict

(logical, Default: TRUE) Whether to consider all packages (alternately only 'relation' specific packages) when computing dependencies for the next level

ignore

package names to ignore

Value

A tibble with three columns: `pkg_1`, `relation` and `pkg_2`

See also

get_all_reverse_dependencies

Examples

pkggraph::init(local = TRUE)
#> Using 'local' data ...
#> To fetch data from CRAN over internet, run:
#> `pkggraph::init(local = FALSE)`
#> Done!
# general use pkggraph::get_all_dependencies("mlr")
#> Error in pkggraph::get_all_dependencies("mlr"): Unable to find `deptable`. Please run `pkggraph::init(local = TRUE)`.
# specify two levels pkggraph::get_all_dependencies("mlr", level = 2)
#> Error in pkggraph::get_all_dependencies("mlr", level = 2): Unable to find `deptable`. Please run `pkggraph::init(local = TRUE)`.
# specify relation(s) pkggraph::get_all_dependencies("mlr", level = 2, relation = "Imports")
#> Error in pkggraph::get_all_dependencies("mlr", level = 2, relation = "Imports"): Unable to find `deptable`. Please run `pkggraph::init(local = TRUE)`.
# setting strict to TRUE to only consider 'Imports' of the previous level pkggraph::get_all_dependencies("mlr" , level = 2 , relation = "Imports" , strict = TRUE)
#> Error in pkggraph::get_all_dependencies("mlr", level = 2, relation = "Imports", strict = TRUE): Unable to find `deptable`. Please run `pkggraph::init(local = TRUE)`.