Learn R Programming

RSuite (version 0.37-253)

prj_config_set_rversion: Updates project configuration to use specified R Version.

Description

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

Usage

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

Run this code
# NOT RUN {
# 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")

# }

Run the code above in your browser using DataLab