retrieve | R Documentation |
Retrieve (download) one or more packages from external sources.
Using renv::retrieve()
can be useful in CI / CD workflows, where
you might want to download all packages listed in a lockfile
before later invoking restore()
. Packages will be downloaded
to an internal path within renv
's local state directories – see
paths for more details.
retrieve(packages = NULL, ..., lockfile = NULL, destdir = NULL, project = NULL)
packages |
Either
See https://remotes.r-lib.org/articles/dependencies.html and the examples below for more details. renv deviates from the remotes spec in one important way: subdirectories
are separated from the main repository specification with a |
... |
Unused arguments, reserved for future expansion. If any arguments
are matched to |
lockfile |
The path to an |
destdir |
The directory where packages should be downloaded.
When |
project |
The project directory. If |
If destdir
is NULL
and the requested package is already available
within the renv
cache, renv
will return the path to that package
directory in the cache.
A named vector, mapping package names to the paths where those packages were downloaded.
## Not run:
# retrieve package + versions as defined in the lockfile
# normally used as a pre-flight step to renv::restore()
renv::retrieve()
# download one or more packages locally
renv::retrieve("rlang", destdir = ".")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.