Description Usage Arguments Details See Also Examples
Updates project configuration to use only specified repository adapters.
1 | prj_config_set_repo_adapters(repos, prj = NULL)
|
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) |
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.
Other in project configuration: prj_config_set_rversion
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.