Skip to content

Instantly share code, notes, and snippets.

@egnha
egnha / get_pkg_info.R
Last active July 31, 2016 11:48
Get R package information from CRAN
#' Get R package information from CRAN
#'
#' \code{get_pkg_info()} retrieves the description of a CRAN package; it is
#' adapted from \url{http://developer.r-project.org/CRAN/Scripts/depends.R}.
#' Results are cached per R session using the
#' \href{https://cran.r-project.org/web/packages/memoise/index.html}{memoise}
#' package.
#'
#' @param pkg Package name (as a string)
#' @param fields Package description fields (as a vector); it corresponds to