| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/isolate.R |
| 3 |
\name{isolate} |
| 4 |
\alias{isolate} |
| 5 |
\title{Isolate a project} |
| 6 |
\usage{ |
| 7 |
isolate(project = NULL) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{project}{The project directory. If \code{NULL}, then the active project will |
| 11 |
be used. If no project is currently active, then the current working |
| 12 |
directory is used instead.} |
| 13 |
} |
| 14 |
\value{ |
| 15 |
The project directory, invisibly. Note that this function is normally |
| 16 |
called for its side effects. |
| 17 |
} |
| 18 |
\description{ |
| 19 |
Copy packages from the renv cache directly into the project library, so |
| 20 |
that the project can continue to function independently of the renv cache. |
| 21 |
} |
| 22 |
\details{ |
| 23 |
After calling \code{isolate()}, renv will still be able to use the cache on |
| 24 |
future \code{\link[=install]{install()}}s and \code{\link[=restore]{restore()}}s. If you'd prefer that renv copy |
| 25 |
packages from the cache, rather than use symlinks, you can set the renv |
| 26 |
configuration option: |
| 27 |
|
| 28 |
\if{html}{\out{<div class="sourceCode">}}\preformatted{options(renv.config.cache.symlinks = FALSE) |
| 29 |
}\if{html}{\out{</div>}} |
| 30 |
|
| 31 |
to force renv to copy packages from the cache, as opposed to symlinking |
| 32 |
them. If you'd like to disable the cache altogether for a project, you can |
| 33 |
use: |
| 34 |
|
| 35 |
\if{html}{\out{<div class="sourceCode">}}\preformatted{settings$use.cache(FALSE) |
| 36 |
}\if{html}{\out{</div>}} |
| 37 |
|
| 38 |
to explicitly disable the cache for the project. |
| 39 |
} |
| 40 |
\examples{ |
| 41 |
\dontrun{ |
| 42 |
|
| 43 |
# isolate a project |
| 44 |
renv::isolate() |
| 45 |
|
| 46 |
} |
| 47 |
} |