Learn R Programming

repo.data (version 0.1.5)

cran_archive: Retrieve CRAN archive

Description

Retrieve the archive and the current database.

Usage

cran_archive(packages = NULL)

Value

A data.frame with 6 columns: Package, Date (of publication), Version, User, size and status (archived or current). It is sorted by package name and date. NA if not able to collect the data from CRAN.

Arguments

packages

A vector with packages or NULL for all packages.

Details

Some packages would get an NA in Version, if package_version() were to be used with strict = FALSE. Packages might have been on CRAN but could have been removed and won't show up. Depending on the data requested and packages currently on CRAN, you might get a warning regarding a package being both archived and current.

See Also

The raw source of the data is: CRAN_archive_db(), CRAN_current_db(). For some dates and comments about archiving packages: cran_comments().

Other meta info from CRAN: cran_alias(), cran_comments(), cran_history(), cran_links()

Examples

Run this code
if (FALSE) { # NROW(available.packages())
# \donttest{
ap <- available.packages()
if (NROW(ap)) {
    a_package <- rownames(ap)[startsWith(rownames(ap), "A")][2]
    ca <- cran_archive(a_package)
    head(ca)
}
# }
}

Run the code above in your browser using DataLab