prj_load: Loads project into the environment so all master scripts can...

Description Usage Arguments Value See Also Examples

Description

It changes .libPaths() so project internal environment is visible for R. Use prj_unload to restore your environment.

Usage

1
prj_load(path, prj = NULL)

Arguments

path

if prj is NULL, the path will be used to init new project to load. If passed must be existing folder path. (type: character)

prj

project to load or NULL to use path for new project initialization. If not path passed project will be initialized from working folder. (type: rsuite_project, default: NULL)

Value

previously loaded project or NULL if no project has been loaded.

See Also

Other in project management: prj_build, prj_clean_deps, prj_init, prj_install_deps, prj_lock_env, prj_pack, prj_start_package, prj_start, prj_unload, prj_zip

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# 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)

cat(.libPaths(), sep = "\n") # show inital contents of .libPaths()

prj_load(prj = prj) # load project
cat(.libPaths(), sep = "\n") # show contents of .libPaths()

prj_unload() # restore environment
cat(.libPaths(), sep = "\n") # show final contents of .libPaths()

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