Define project-local settings that can be used to adjust the behavior of renv with your particular project.

settings

## Format

An object of class list of length 8.

## Settings

external.libraries

A vector of library paths, to be used in addition to the project's own private library. This can be useful if you have a package available for use in some global library, but for some reason renv is not able to install that package (e.g. sources or binaries for that package are not publicly available, or you have been unable to orchestrate the pre-requisites for installing some packages from source on your machine).

ignored.packages

A vector of packages, which should be ignored when attempting to snapshot the project's private library. Note that if a package has already been added to the lockfile, that entry in the lockfile will not be ignored.

package.dependency.fields

During dependency discovery, renv uses the fields of an installed package's DESCRIPTION file to determine that package's recursive dependencies. By default, the Imports, Depends and LinkingTo fields are used. If you'd prefer that renv also captures the Suggests dependencies for a package, you can set this to c("Imports", "Depends", "LinkingTo", "Suggests").

r.version

The version of R to encode within the lockfile. This can be set as a project-specific option if you'd like to allow multiple users to use the same renv project with different versions of R. renv will still warn the user if the major + minor version of R used in a project does not match what is encoded in the lockfile.

snapshot.type

The type of snapshot to perform by default. See snapshot for more details.

use.cache

Use a global cache of R packages. When active, renv will install packages into a global cache, and link packages from the cache into your renv projects as appropriate. This can greatly save on disk space and install time when for R packages which are used across multiple projects in the same environment.

vcs.ignore.library

Set whether the renv project library is excluded from version control.

## Defaults

You can change the default values of these settings for newly-created renv projects by setting R options for renv.settings or renv.settings.<name>. For example:

options(renv.settings = list(snapshot.type = "all"))
options(renv.settings.snapshot.type = "all")


If both of the renv.settings and renv.settings.<name> options are set for a particular key, the option associated with renv.settings.<name> is used instead. We recommend setting these in an appropriate startup profile, e.g. ~/.Rprofile or similar.

## Examples


if (FALSE) {

# view currently-ignored packaged
renv::settings$ignored.packages() # ignore a set of packages renv::settings$ignored.packages("devtools", persist = FALSE)

}