Learn R Programming

pkggraph (version 0.2.3)

get_all_dependencies: get_all_dependencies

Description

Get all dependencies

Usage

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

Run this code
# NOT RUN {
pkggraph::init(local = TRUE)
# general use
pkggraph::get_all_dependencies("mlr")
# specify two levels
pkggraph::get_all_dependencies("mlr", level = 2)
# specify relation(s)
pkggraph::get_all_dependencies("mlr", level = 2, relation = "Imports")
# setting strict to TRUE to only consider 'Imports' of the previous level
pkggraph::get_all_dependencies("mlr"
                               , level    = 2
                               , relation = "Imports"
                               , strict   = TRUE)
# }

Run the code above in your browser using DataLab