prj_config_set_repo_adapters: Updates project configuration to use only specified...

Description Usage Arguments Details See Also Examples

Description

Updates project configuration to use only specified repository adapters.

Usage

1

Arguments

repos

vector of repository adapters configuration to use by the project. Each should be in form <repo_adapter_name>[<arg>]. They should be all registered. (type: character)

prj

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

Details

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

After project configuration have been changed repository adapters are initialized on the project.

Repository adapters will be used for dependencies detection in the same order as passed in names.

See Also

Other in project configuration: prj_config_set_rversion

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_repo_adapters(c("CRAN", "MRAN[2018-01-01]"), prj = prj)

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

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