dot-set_r_version: Set R version for build and console

.set_r_versionR Documentation

Set R version for build and console

Description

Set R version in VSC settings.

Usage

.set_r_version(
  r_v = "",
  nm = c("r.rpath.windows", "r.rterm.option"),
  path_to_settings = here::here(".vscode/settings.json"),
  r_dir = "C:\\Program Files\\R"
)

.srv(
  r_v = "",
  nm = c("r.rpath.windows", "r.rterm.option"),
  path_to_settings = here::here(".vscode/settings.json"),
  r_dir = "C:\\Program Files\\R"
)

Arguments

r_v

character. R version. If "3" or "4", then set to "3.6.3" or "4.1.2", respectively. Otherwise must specify full version.

nm

character R\.set_vsc_setting-r_version.rvector. VSC options to set R version for. At present, must be options starting either with "r.rpath" or "r.term". Default is c("r.rpath.windows", "r.rterm.option").

r_dir

character. Path where "R-<version>/bin/R.exe" is.

Value

invisible(TRUE). Side effect is that JSON file with settings is updated.


MiguelRodo/alwaysloaded documentation built on Nov. 7, 2023, 5:18 p.m.