This function uses api of CRAN Data Base to scrap the DESCRIPTION file and CRAN metadata of the package. It caches the results to speed the computation process.

get_description(package, bioc = FALSE, local = FALSE, reset_cache = FALSE)

Arguments

package

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

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).

reset_cache

A logical value. If TRUE the cache will be cleared before obtaining the list of packages.

Value

An object of package_description class.

Examples

library(deepdep) description <- get_description("ggplot2") description
#> digest: Create Compact Hash Digests of R Objects #> Maintainer: Dirk Eddelbuettel <edd@debian.org> #> Description: #> Implementation of a function 'digest()' for the creation #> of hash digests of arbitrary R objects (using the 'md5', 'sha-1', 'sha-256', #> 'crc32', 'xxhash', 'murmurhash' and 'spookyhash' algorithms) permitting easy #> comparison of R language objects, as well as functions such as'hmac()' to #> create hash-based message authentication code. Please note that this package #> is not meant to be deployed for cryptographic purposes for which more #> comprehensive (and widely tested) libraries such as 'OpenSSL' should be #> used. #> Depends: R #> Imports: utils #> LinkingTo: #> Suggests: tinytest knitr rmarkdown #> Enhances: #> Scrap date: 2020-02-23 00:56:25
# \donttest{ description_local <- get_description("deepdep", local = TRUE) description_local
#> deepdep: Visualise and Explore the Deep Dependencies of R Packages #> Maintainer: Dominik Rafacz <dominikrafacz@gmail.com> #> Description: #> Provides tools for exploration of R package dependencies. #> Depends: R #> Imports: cranlogs ggforce ggplot2 ggraph graphlayouts httr igraph jsonlite scales #> LinkingTo: #> Suggests: BiocManager shiny shinycssloaders covr devtools knitr miniCRAN plyr rmarkdown spelling stringi testthat #> Enhances: #> Scrap date:
# }