prj_config_set_rversion: Updates project configuration to use specified R Version.

Description Usage Arguments See Also Examples

Description

Project configuration (together with R version to be used) is stored in PARAMETERS file in the project folder.

Usage

1
prj_config_set_rversion(rver, prj = NULL, validate = TRUE)

Arguments

rver

R version to be used by the project. (type: character)

prj

project object to update configuration for. If not passed the loaded project will used or the default whichever exists. Will init default project from the working directory if no default project exists. (type: rsuite_project, default: NULL)

validate

If TRUE will check if R version is valid for the platform. (type: logical, default: TRUE)

See Also

Other in project configuration: prj_config_set_repo_adapters

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# create exemplary project base folder
prj_base <- tempfile("example_")
dir.create(prj_base, recursive = TRUE, showWarnings = FALSE)

# start project
prj <- prj_start("my_project", skip_rc = TRUE, path = prj_base)

# present initial project configuration
cat(readLines(file.path(prj$path, "PARAMETERS")), sep = "\n")

# set repositories to use
prj_config_set_rversion("3.2", prj = prj, validate = FALSE)

# present final project configuration
cat(readLines(file.path(prj$path, "PARAMETERS")), sep = "\n")

RSuite documentation built on June 10, 2019, 5:03 p.m.