cran_archive_list {pkgcache} | R Documentation |
Data about older versions of CRAN packages
Description
CRAN mirrors store older versions of packages in /src/contrib/Archive
,
and they also store some metadata about them in
/src/contrib/Meta/archive.rds
. pkgcache can download and cache this
metadata.
Usage
cran_archive_list(
cran_mirror = default_cran_mirror(),
update_after = as.difftime(7, units = "days"),
packages = NULL
)
cran_archive_update(cran_mirror = default_cran_mirror())
cran_archive_cleanup(cran_mirror = default_cran_mirror(), force = FALSE)
cran_archive_summary(cran_mirror = default_cran_mirror())
Arguments
cran_mirror |
CRAN mirror to use, see |
update_after |
|
packages |
Character vector. Only report these packages. |
force |
Force cleanup in non-interactive mode. |
Details
cran_archive_list()
lists all versions of all (or some) packages.
It updates the cached data first, if it is older than the specified
limit.
cran_archive_update()
updates the archive cache.
cran_archive_cleanup()
cleans up the archive cache for
cran_mirror
.
cran_archive_summary()
prints a summary about the archive
cache.
Value
cran_archive_list()
returns a data frame with columns:
-
package
: package name, -
version
: package version. This is a character vector, and not apackage_version()
object. Some older package versions are not supported bypackage_version()
. -
raw
: the raw row names from the CRAN metadata. -
mtime
:mtime
column from the CRAN metadata. This is usually pretty close to the release date and time of the package. -
url
: package download URL. -
mirror
: CRAN mirror that was used to get this data. The output is ordered according to package names (case insensitive) and release dates.
cran_archive_update()
returns all archive data in a data frame,
in the same format as cran_archive_list()
, invisibly.
cran_archive_cleanup()
returns nothing.
cran_archive_summary()
returns a named list with elements:
-
cachepath
: Path to the directory that contains all archive cache. -
current_rds
: Path to the RDS file that contains the data for the specifiedcran_mirror
. -
lockfile
: Path to the lock file forcurrent_rds
. -
timestamp
: Path to the time stamp forcurrent_rds
.NA
if the cache is empty. -
size
: Size ofcurrent_rds
. Zero if the cache is empty.
See Also
The cran_archive_cache
class for more flexibility.
Examples
cran_archive_list(packages = "readr")