# Generated by fusen: do not edit by hand
#' Get number of packages on CRAN at a given date
#'
#' Query MRAN to Get number of packages on CRAN at a given date.
#' MRAN -> Microsoft snapshots of CRAN.
#'
#' @param date A character string representing a date of the form yyyy-mm-dd.
#'
#' @return A data.frame with 2 columns `date` and `n` the number of packages on CRAN
#' at that date.
#'
#' @export
#' @importFrom utils available.packages
#'
#' @examples
#' cranology("2020-03-15")
cranology <- function(date) {
data.frame(
date = date,
n = nrow(
available.packages(
repos = sprintf("https://mran.microsoft.com/snapshot/%s", date)
)
)
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.