This function uses get_description and get_downloads to acquire the dependencies of the package (with their downloads).

get_dependencies(
  package,
  downloads = TRUE,
  bioc = FALSE,
  local = FALSE,
  dependency_type = c("Depends", "Imports")
)

Arguments

package

A character. Name of the package that is on CRAN, Bioconductor repository or locally installed. See bioc and local arguments.

downloads

A logical. If TRUE add package downloads data. By default it's TRUE.

bioc

A logical value. If TRUE the Bioconductor dependencies data will be taken from the Bioconductor repository. For this option to work properly, BiocManager package needs to be installed.

local

A logical value. If TRUE only data of locally installed packages will be used (without API usage).

dependency_type

A character vector. Types of the dependencies that should be sought. Possibilities are: "Imports", "Depends", "Suggests", "Enhances", "LinkingTo". By default it's "Depends", "Imports".

Value

An object of package_dependencies class.

See also

Examples

library(deepdep) dependencies <- get_dependencies("htmltools", downloads = FALSE) dependencies
#> name version type #> 1 digest <NA> Imports #> 2 Rcpp <NA> Imports #> 3 rlang <NA> Imports
# \donttest{ dependencies_local <- get_dependencies("deepdep", downloads = FALSE, local = TRUE) dependencies_local
#> [1] name version type #> <0 wierszy> (lub 'row.names' o zerowej długości)
# }