load: Load a Project

Description Usage Arguments Details Value Examples

View source: R/load.R

Description

Load an renv project.

Usage

1
load(project = getwd(), quiet = FALSE)

Arguments

project

The project directory. If NULL, then the active project will be used. If no project is currently active, then the current working directory is used instead.

quiet

Boolean; be quiet during load?

Details

Calling renv::load() will set the session's library paths to use a project-local library, and perform some other work to ensure the project is properly isolated from other packages on the system.

Normally, renv::load() is called automatically by the project auto-loader written to the project .Rprofile by init(). This allows R sessions launched from the root of an renv project directory to automatically load that project, without requiring explicit action from the user. However, if preferred or necessary, one can call renv::load("<project>") to explicitly load an renv project located at a particular path.

Value

The project directory, invisibly. Note that this function is normally called for its side effects.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 

# load a project -- note that this is normally done automatically
# by the project's auto-loader, but calling this explicitly to
# load a particular project may be useful in some circumstances
renv::load()


## End(Not run)

wnattt/renv documentation built on Dec. 23, 2021, 5:19 p.m.