Learn R Programming

renv (version 0.1.0-118)

paths: Path Customization

Description

Customize the paths that renv uses for global state storage.

Arguments

Details

By default, all state is collected into a directory at ~/.renv. If desired, this path can be adjusted by setting the RENV_PATHS_ROOT environment variable. This can be useful if you'd like multiple users to be able to share a single global cache of installed packages.

The various state sub-directories can also be individually adjusted, if so desired (e.g. you'd prefer to keep the cache of package installations on a separate volume). The various environment variables that can be set are enumerated below:

Environment Variable Description
RENV_PATHS_ROOT The root path used for global state storage.
RENV_PATHS_BOOTSTRAP The library path containing bootstrapped renv installations.
RENV_PATHS_LIBRARY The root path containing different R libraries.
RENV_PATHS_SOURCE The path containing downloaded package sources.
RENV_PATHS_BINARY The path containing downloaded package binaries.
RENV_PATHS_CACHE The path containing cached package installations.
RENV_PATHS_REPOS The path containing cached available package information.
RENV_PATHS_EXTSOFT (Windows only) The path containing external software needed for compilation of Windows source packages.

If reproducibility of a project is desired on a particular machine, it is highly recommended that the renv cache of installed packages + binary packages is stored, so that packages can be easily restored in the future -- installation of packages from source can often be arduous.

If you want these settings to persist in your project, it is recommended that you add these to an appropriate R startup file. For example, these could be set in:

  • A project-local .Renviron;

  • The user-level .Renviron;

  • A file at $(R RHOME)/etc/Renviron.site.

Please see ?Startup for more details.