Load an renv
project.
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?
Value
The project directory, invisibly. Note that this function is normally called for its side effects.
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.
Use activate()
to activate (or re-activate) an renv
project, so
that newly-launched R sessions can automatically load the associated
project. Similarly, use deactivate()
to disable the project
auto-loader, so that renv
is no longer automatically activated for new
R sessions in this project.