set_environment: Set rprofile environment

Description Usage Arguments

View source: R/rprofile.R

Description

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.

Usage

 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")))

Arguments

home

Where to create the version package library. Defaults to "rprofile.home" option if set, else base::R.home().

latest

Logical. Use the CRAN mirror without a snapshot date. Defaults to "rprofile.latest" option if set, else FALSE.

r_name

An R version (e.g. "3.5") used to select the snapshot. Defaults to "rprofile.r_name" option if set, else rprofile::version_r_major_minor().

cran_map

Named character vector. Name-value pairs (R version = CRAN snapshot). If provided, overrides default values returned by rprofile::map_r_to_snapshot().

bioc_map

Named character vector. Name-value pairs (R version = Bioc version). If provided, overrides default values returned by rprofile::map_r_to_bioc().

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 base::interactive().

system_pkgs

Character vector of packages that are allowed in the system library. Defaults to "rprofile.system_pkgs" option if set, else c("remotes", "rprofile").


EricEdwardBryant/rprofile documentation built on Dec. 7, 2019, 12:30 a.m.