Learn R Programming

renv (version 0.7.0-7)

refresh: Refresh the Local Cache of Packages Available on CRAN

Description

Query the active CRAN repositories for available packages, and update the in-memory cache of those packages.

Usage

refresh()

Arguments

Details

Note that R also maintains its own on-disk cache of available packages, which is used by available.packages(). Calling refresh() will force an update of both types of caches. renv prefers using an in-memory cache as on occasion the temporary directory can be slow to access (e.g. when it is a mounted network filesystem).

Examples

Run this code
# NOT RUN {
# check CRAN available packages
db <- available.packages()

# wait some time (suppose packages are uploaded to CRAN in this time)
Sys.sleep(5)

# refresh the local CRAN available packages database
# (the old locally cached db will be removed)
db <- renv::refresh()

# }

Run the code above in your browser using DataLab