-
Notifications
You must be signed in to change notification settings - Fork 153
/
Copy pathload.Rd
70 lines (60 loc) · 2.64 KB
/
load.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/load.R
\name{load}
\alias{load}
\title{Load a project}
\usage{
load(project = NULL, quiet = FALSE, profile = NULL, ...)
}
\arguments{
\item{project}{The project directory. If \code{NULL}, then the active project will
be used. If no project is currently active, then the current working
directory is used instead.}
\item{quiet}{Boolean; be quiet during load?}
\item{profile}{The profile to be activated. See
\code{vignette("profiles", package = "renv")} for more information.
When \code{NULL} (the default), the profile is not changed. Use
\code{profile = "default"} to revert to the default \code{renv} profile.}
\item{...}{Unused arguments, reserved for future expansion. If any arguments
are matched to \code{...}, renv will signal an error.}
}
\value{
The project directory, invisibly. Note that this function is normally
called for its side effects.
}
\description{
\code{renv::load()} sets the library paths to use a project-local library,
sets up the system library \link{sandbox}, if needed, and creates shims
for \code{install.packages()}, \code{update.packages()}, and \code{remove.packages()}.
You should not generally need to call \code{renv::load()} yourself, as it's
called automatically by the project auto-loader created by \code{\link[=init]{init()}}/
\code{\link[=activate]{activate()}}. However, if needed, you can use \code{renv::load("<project>")}
to explicitly load an renv project located at a particular path.
}
\section{Shims}{
To help you take advantage of the package cache, renv places a couple of
shims on the search path:
\itemize{
\item \code{install.packages()} instead calls \code{renv::install()}.
\item \code{remove.packages()} instead calls \code{renv::remove()}.
\item \code{update.packages()} instead calls \code{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
\verb{utils::install.packages(<...>)}.
If you'd prefer not to use the renv shims at all, they can be disabled by
setting the R option \code{options(renv.config.shims.enabled = FALSE)} or by
setting the environment variable \code{RENV_CONFIG_SHIMS_ENABLED = FALSE}. See
\code{?config} for more details.
}
\examples{
\dontrun{
# 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()
}
}