load | R Documentation |
renv::load()
sets the library paths to use a project-local library,
sets up the system library sandbox, if needed, and creates shims
for install.packages()
, update.packages()
, and remove.packages()
.
You should not generally need to call renv::load()
yourself, as it's
called automatically by the project auto-loader created by init()
/
activate()
. However, if needed, you can use renv::load("<project>")
to explicitly load an renv project located at a particular path.
load(project = NULL, quiet = FALSE, profile = NULL, ...)
project |
The project directory. If |
quiet |
Boolean; be quiet during load? |
profile |
The profile to be activated. See
|
... |
Unused arguments, reserved for future expansion. If any arguments
are matched to |
The project directory, invisibly. Note that this function is normally called for its side effects.
To help you take advantage of the package cache, renv places a couple of shims on the search path:
install.packages()
instead calls renv::install()
.
remove.packages()
instead calls renv::remove()
.
update.packages()
instead calls renv::update()
.
This allows you to keep using your existing muscle memory for installing, updating, and remove packages, while taking advantage of renv features like the package cache.
If you'd like to bypass these shims within an R session, you can explicitly
call the version of these functions from the utils package, e.g. with
utils::install.packages(<...>)
.
If you'd prefer not to use the renv shims at all, they can be disabled by
setting the R option options(renv.config.shims.enabled = FALSE)
or by
setting the environment variable RENV_CONFIG_SHIMS_ENABLED = FALSE
. See
?config
for more details.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.