Build a lookup table of CRAN archive first appearance dates
Source:R/get_first_release.R
build_archive_df.RdConstructs a data frame mapping package names to their earliest known appearance in the CRAN archive, inferred from file modification times.
Arguments
- cran_archive_db
Optional result of
tools::CRAN_archive_db(). If not supplied, it is retrieved internally.
Value
A data frame with columns:
package– package namearchive_date– earliest archive date (Date) orNA
Details
The CRAN archive database is a named list of data frames, one per package.
For each package, the earliest file mtime is used as a proxy for the
archive entry date. Packages with empty archive entries return NA.
This function is intended to be called once and the result reused for efficient per-package lookups.
Examples
if (FALSE) { # \dontrun{
archive_db <- tools::CRAN_archive_db()
archive_df <- build_archive_df(archive_db)
} # }