This function configures versioned package repositories and libraries based on the current version of R. It allows the user to designate fixed package repositories that are tied to a particular version of R.
1 2 3 4 5 6 7 8 9 10 11 | set_environment(home = getOption("rprofile.home", R.home()),
latest = getOption("rprofile.latest", FALSE),
r_name = getOption("rprofile.r_name", version_r_major_minor()),
cran_map = getOption("rprofile.cran_map"),
bioc_map = getOption("rprofile.bioc_map"),
cran_mirror = getOption("rprofile.cran_mirror",
"https://cran.microsoft.com"),
bioc_mirror = getOption("rprofile.bioc_mirror",
"https://bioconductor.org"), verbose = getOption("rprofile.verbose",
interactive()), system_pkgs = getOption("rprofile.system_pkgs",
c("remotes", "rprofile")))
|
home |
Where to create the version package library.
Defaults to "rprofile.home" option if set, else |
latest |
Logical. Use the CRAN mirror without a snapshot date.
Defaults to "rprofile.latest" option if set, else |
r_name |
An R version (e.g. "3.5") used to select the snapshot.
Defaults to "rprofile.r_name" option if set, else
|
cran_map |
Named character vector.
Name-value pairs (R version = CRAN snapshot).
If provided, overrides default values returned by
|
bioc_map |
Named character vector.
Name-value pairs (R version = Bioc version).
If provided, overrides default values returned by
|
cran_mirror |
URL for CRAN snapshot mirror. Defaults to "rprofile.cran_mirror" option if set, else https://cran.microsoft.com. |
bioc_mirror |
URL for Bioconductor mirror. Defaults to "rprofile.bioc_mirror" option if set, else https://bioconductor.org. |
verbose |
Whether to message user with environment information.
Defaults to "rprofile.verbose" option if set, else |
system_pkgs |
Character vector of packages that are allowed in the
system library.
Defaults to "rprofile.system_pkgs" option if set, else
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.