Description Usage Arguments Value Examples
This function assigns a date to each version of R, which can be used to set a versioned CRAN package repository.
1 2 3 4 | map_r_to_snapshot(...)
version_cran(..., r_name = getOption("rprofile.r_name",
version_r_major_minor()), latest = getOption("rprofile.latest", FALSE))
|
... |
Custom mappings in name (R version) value (snapshot) pairs.
Overrides default values returned by |
r_name |
An R version (e.g. "3.5") used to select the snapshot.
Defaults to "rprofile.r_name" option if set, else
|
latest |
Logical. Use the CRAN mirror without a snapshot date.
Defaults to "rprofile.latest" option if set, else |
Returns a date in "YYYY-MM-DD" format, or "latest".
For unkown R versions, the release date for the current R session version
will be used as a fall back unless latest = TRUE
.
1 2 3 4 5 | # Get default snapshot date for current R version
rprofile::version_cran()
# Change the snapshot date for version 3.3
rprofile::version_cran("3.3" = "2100-05-01")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.