Look up the dependencies of a package
pkg_deps(pkg, upgrade = TRUE, dependencies = NA)
Package names or package references. E.g.
ggplot2
: package from CRAN, Bioconductor or a CRAN-like repository
in general,
tidyverse/ggplot2
: package from GitHub,
tidyverse/ggplot2@v3.4.0
: package from GitHub tag or branch,
https://examples.com/.../ggplot2_3.3.6.tar.gz
: package from URL,
.
: package in the current working directory.
See "Package sources" for more details.
Whether to use the most recent available package versions.
What kinds of dependencies to install. Most commonly one of the following values:
NA
: only required (hard) dependencies,
TRUE
: required dependencies plus optional and development
dependencies,
FALSE
: do not install any dependencies. (You might end up with a
non-working package, and/or the installation might fail.)
See Package dependency types for other possible values and more
information about package dependencies.
A data frame with the dependency data, it includes pkg
as well. It has the following columns.
include_docs("pkgdepends", "docs/resolution-result.rds")
pkg_deps("dplyr")
#> # A data frame: 16 × 32 #> ref type direct direc…¹ status package version license needs…² #> <chr> <chr> <lgl> <lgl> <chr> <chr> <chr> <chr> <lgl> #> 1 R6 stan… FALSE FALSE OK R6 2.5.1 MIT + … FALSE #> 2 cli stan… FALSE FALSE OK cli 3.4.1 MIT + … FALSE #> 3 dplyr stan… TRUE TRUE OK dplyr 1.0.10 MIT + … FALSE #> 4 fansi stan… FALSE FALSE OK fansi 1.0.3 GPL-2 … FALSE #> 5 generics stan… FALSE FALSE OK generi… 0.1.3 MIT + … FALSE #> 6 glue stan… FALSE FALSE OK glue 1.6.2 MIT + … FALSE #> 7 lifecycle stan… FALSE FALSE OK lifecy… 1.0.3 MIT + … FALSE #> 8 magrittr stan… FALSE FALSE OK magrit… 2.0.3 MIT + … FALSE #> 9 pillar stan… FALSE FALSE OK pillar 1.8.1 MIT + … FALSE #> 10 pkgconfig stan… FALSE FALSE OK pkgcon… 2.0.3 MIT + … FALSE #> 11 rlang stan… FALSE FALSE OK rlang 1.0.6 MIT + … FALSE #> 12 tibble stan… FALSE FALSE OK tibble 3.1.8 MIT + … FALSE #> 13 tidysele… stan… FALSE FALSE OK tidyse… 1.2.0 MIT + … FALSE #> 14 utf8 stan… FALSE FALSE OK utf8 1.2.2 Apache… FALSE #> 15 vctrs stan… FALSE FALSE OK vctrs 0.5.1 MIT + … FALSE #> 16 withr stan… FALSE FALSE OK withr 2.5.0 MIT + … FALSE #> # … with 23 more variables: priority <chr>, md5sum <chr>, sha256 <chr>, #> # filesize <int>, built <chr>, platform <chr>, rversion <chr>, #> # repotype <chr>, repodir <chr>, target <chr>, deps <list>, #> # mirror <chr>, sources <list>, remote <list>, error <list>, #> # metadata <list>, dep_types <list>, params <list>, sysreqs <chr>, #> # cache_status <chr>, lib_status <chr>, old_version <chr>, #> # new_version <chr>, and abbreviated variable names ¹directpkg, …
For a package on GitHub:
pkg_deps("r-lib/callr")
#> # A data frame: 4 × 32 #> ref type direct direc…¹ status package version license needs…² #> <chr> <chr> <lgl> <lgl> <chr> <chr> <chr> <chr> <lgl> #> 1 r-lib/cal… gith… TRUE TRUE OK callr 3.7.3.… MIT + … TRUE #> 2 R6 stan… FALSE FALSE OK R6 2.5.1 MIT + … FALSE #> 3 processx stan… FALSE FALSE OK proces… 3.8.0 MIT + … FALSE #> 4 ps stan… FALSE FALSE OK ps 1.7.2 MIT + … FALSE #> # … with 23 more variables: priority <chr>, md5sum <chr>, sha256 <chr>, #> # filesize <int>, built <chr>, platform <chr>, rversion <chr>, #> # repotype <chr>, repodir <chr>, target <chr>, deps <list>, #> # mirror <chr>, sources <list>, remote <list>, error <list>, #> # metadata <list>, dep_types <list>, params <list>, sysreqs <chr>, #> # cache_status <chr>, lib_status <chr>, old_version <chr>, #> # new_version <chr>, and abbreviated variable names ¹directpkg, …
Other package functions:
lib_status()
,
pak()
,
pkg_deps_tree()
,
pkg_download()
,
pkg_install()
,
pkg_remove()
,
pkg_status()
,
pkg_sysreqs()