% Generated by roxygen2: do not edit by hand % Please edit documentation in R/package.R \name{pkg_deps} \alias{pkg_deps} \title{Look up the dependencies of a package} \usage{ pkg_deps(pkg, upgrade = TRUE, dependencies = NA) } \arguments{ \item{pkg}{Package names or package references. E.g. \itemize{ \item \code{ggplot2}: package from CRAN, Bioconductor or a CRAN-like repository in general, \item \code{tidyverse/ggplot2}: package from GitHub, \item \code{tidyverse/ggplot2@v3.4.0}: package from GitHub tag or branch, \item \verb{https://examples.com/.../ggplot2_3.3.6.tar.gz}: package from URL, \item \code{.}: package in the current working directory. } See "\link{Package sources}" for more details.} \item{upgrade}{Whether to use the most recent available package versions.} \item{dependencies}{What kinds of dependencies to install. Most commonly one of the following values: \itemize{ \item \code{NA}: only required (hard) dependencies, \item \code{TRUE}: required dependencies plus optional and development dependencies, \item \code{FALSE}: do not install any dependencies. (You might end up with a non-working package, and/or the installation might fail.) See \link{Package dependency types} for other possible values and more information about package dependencies. }} } \value{ A data frame with the dependency data, it includes \code{pkg} as well. It has the following columns. \eval{include_docs("pkgdepends", "docs/resolution-result.rds")} } \description{ Look up the dependencies of a package } \section{Examples}{ \if{html}{\out{
    }}\preformatted{pkg_deps("dplyr")
    }\if{html}{\out{
}}\if{html}{\out{

    #> # 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: \if{html}{\out{
    }}\preformatted{pkg_deps("r-lib/callr")
    }\if{html}{\out{
}}\if{html}{\out{

    #> # 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, …

}} } \seealso{ Other package functions: \code{\link{lib_status}()}, \code{\link{pak}()}, \code{\link{pkg_deps_tree}()}, \code{\link{pkg_download}()}, \code{\link{pkg_install}()}, \code{\link{pkg_remove}()}, \code{\link{pkg_status}()}, \code{\link{pkg_sysreqs}()} } \concept{package functions}