Learn R Programming

renv (version 0.9.3)

settings: Project Settings

Description

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

Usage

settings

Arguments

Format

An object of class list of length 6.

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").

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 = "simple"))
options(renv.settings.snapshot.type = "simple")

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

Run this code
# NOT RUN {
# }
# NOT RUN {
# view currently-ignored packaged
renv::settings$ignored.packages()

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

# }

Run the code above in your browser using DataLab