pkg_deps_explain {pak} | R Documentation |
Explain how a package depends on other packages
Description
Extract dependency chains from pkg
to deps
.
Usage
pkg_deps_explain(pkg, deps, upgrade = TRUE, dependencies = NA)
Arguments
pkg |
Package names or package references. E.g.
See "Package sources" for more details. |
deps |
Package names of the dependencies to explain. |
upgrade |
Whether to use the most recent available package versions. |
dependencies |
What kinds of dependencies to install. Most commonly one of the following values:
|
Details
This function is similar to pkg_deps_tree()
, but its output is easier
to read if you are only interested is certain packages (deps
).
Value
A named list with a print method. First entries are the
function arguments: pkg
, deps
, dependencies
, the last one is
paths
and it contains the results in a named list, the names are
the package names in deps
.
Examples
How does dplyr depend on rlang?
pkg_deps_explain("dplyr", "rlang")
#> ✔ Updated metadata database: 5.09 MB in 12 files. #> ✔ Updating metadata database ... done #> dplyr -> lifecycle -> rlang #> dplyr -> rlang #> dplyr -> tibble -> lifecycle -> rlang #> dplyr -> tibble -> pillar -> lifecycle -> rlang #> dplyr -> tibble -> pillar -> rlang #> dplyr -> tibble -> pillar -> vctrs -> lifecycle -> rlang #> dplyr -> tibble -> pillar -> vctrs -> rlang #> dplyr -> tibble -> rlang #> dplyr -> tibble -> vctrs -> lifecycle -> rlang #> dplyr -> tibble -> vctrs -> rlang #> dplyr -> tidyselect -> lifecycle -> rlang #> dplyr -> tidyselect -> rlang #> dplyr -> tidyselect -> vctrs -> lifecycle -> rlang #> dplyr -> tidyselect -> vctrs -> rlang #> dplyr -> vctrs -> lifecycle -> rlang #> dplyr -> vctrs -> rlang #> dplyr -> pillar -> lifecycle -> rlang #> dplyr -> pillar -> rlang #> dplyr -> pillar -> vctrs -> lifecycle -> rlang #> dplyr -> pillar -> vctrs -> rlang
How does the GH version of usethis depend on cli and ps?
pkg_deps_explain("r-lib/usethis", c("cli", "ps"))
#> usethis -> cli #> usethis -> desc -> cli #> usethis -> gh -> cli #> usethis -> lifecycle -> cli #> #> x ps