| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/settings.R |
| 3 |
\docType{data} |
| 4 |
\name{settings} |
| 5 |
\alias{settings} |
| 6 |
\title{Project settings} |
| 7 |
\usage{ |
| 8 |
settings |
| 9 |
} |
| 10 |
\value{ |
| 11 |
A named list of renv settings. |
| 12 |
} |
| 13 |
\description{ |
| 14 |
Define project-local settings that can be used to adjust the behavior of |
| 15 |
renv with your particular project. |
| 16 |
\itemize{ |
| 17 |
\item Get the current value of a setting with (e.g.) \code{settings$snapshot.type()} |
| 18 |
\item Set current value of a setting with (e.g.) |
| 19 |
\code{settings$snapshot.type("explicit")}. |
| 20 |
} |
| 21 |
|
| 22 |
Settings are automatically persisted across project sessions by writing to |
| 23 |
\code{renv/settings.json}. You can also edit this file by hand, but you'll need |
| 24 |
to restart the session for those changes to take effect. |
| 25 |
\subsection{\code{bioconductor.version}}{ |
| 26 |
|
| 27 |
The Bioconductor version to be used with this project. Use this if you'd |
| 28 |
like to lock the version of Bioconductor used on a per-project basis. |
| 29 |
When unset, renv will try to infer the appropriate Bioconductor release |
| 30 |
using the BiocVersion package if installed; if not, renv uses |
| 31 |
\code{BiocManager::version()} to infer the appropriate Bioconductor version. |
| 32 |
} |
| 33 |
|
| 34 |
\subsection{\code{external.libraries}}{ |
| 35 |
|
| 36 |
A vector of library paths, to be used in addition to the project's own |
| 37 |
private library. This can be useful if you have a package available for use |
| 38 |
in some system library, but for some reason renv is not able to install |
| 39 |
that package (e.g. sources or binaries for that package are not publicly |
| 40 |
available, or you have been unable to orchestrate the pre-requisites for |
| 41 |
installing some packages from source on your machine). |
| 42 |
} |
| 43 |
|
| 44 |
\subsection{\code{lockfile.sanitize}}{ |
| 45 |
|
| 46 |
Should renv sanitize repository URLs when writing the lockfile? When |
| 47 |
\code{TRUE}, embedded credentials are stripped from URLs (e.g. |
| 48 |
\verb{https://user:token@host/path} becomes \verb{https://host/path}) to prevent |
| 49 |
accidental credential leakage. Set this to \code{FALSE} if your repository |
| 50 |
URLs contain credentials required for \link{restore} to function correctly. |
| 51 |
} |
| 52 |
|
| 53 |
\subsection{\code{ignored.packages}}{ |
| 54 |
|
| 55 |
A vector of packages, which should be ignored when attempting to snapshot |
| 56 |
the project's private library. Note that if a package has already been |
| 57 |
added to the lockfile, that entry in the lockfile will not be ignored. |
| 58 |
} |
| 59 |
|
| 60 |
\subsection{\code{package.dependency.fields}}{ |
| 61 |
|
| 62 |
When installing a package with \code{install()}, what \code{DESCRIPTION} fields should |
| 63 |
be used to determine that package's dependencies? The default uses |
| 64 |
\code{c("Imports", "Depends", "LinkingTo")}, but if you also want to install |
| 65 |
\code{Suggests} dependencies for a package, you can set this to |
| 66 |
\code{c("Imports", "Depends", "LinkingTo", "Suggests")}. |
| 67 |
} |
| 68 |
|
| 69 |
\subsection{\code{ppm.enabled}}{ |
| 70 |
|
| 71 |
Enable \href{https://packagemanager.posit.co/}{Posit Package Manager} |
| 72 |
integration in this project? When \code{TRUE}, renv will attempt to transform |
| 73 |
repository URLs used by PPM into binary URLs as appropriate for the |
| 74 |
current Linux platform. Set this to \code{FALSE} if you'd like to continue using |
| 75 |
source-only PPM URLs, or if you find that renv is improperly transforming |
| 76 |
your repository URLs. You can still set and use PPM repositories with this |
| 77 |
option disabled; it only controls whether renv tries to transform source |
| 78 |
repository URLs into binary URLs on your behalf. |
| 79 |
} |
| 80 |
|
| 81 |
\subsection{\code{ppm.ignored.urls}}{ |
| 82 |
|
| 83 |
When \href{https://packagemanager.posit.co/}{Posit Package Manager} integration |
| 84 |
is enabled, \code{renv} will attempt to transform source repository URLs into |
| 85 |
binary repository URLs. This setting can be used if you'd like to avoid this |
| 86 |
transformation with some subset of repository URLs. |
| 87 |
} |
| 88 |
|
| 89 |
\subsection{\code{r.version}}{ |
| 90 |
|
| 91 |
The version of \R to encode within the lockfile. This can be set as a |
| 92 |
project-specific option if you'd like to allow multiple users to use |
| 93 |
the same renv project with different versions of \R. renv will |
| 94 |
still warn the user if the major + minor version of \R used in a project |
| 95 |
does not match what is encoded in the lockfile. |
| 96 |
} |
| 97 |
|
| 98 |
\subsection{\code{snapshot.type}}{ |
| 99 |
|
| 100 |
The type of snapshot to perform by default. See \link{snapshot} for more |
| 101 |
details. |
| 102 |
} |
| 103 |
|
| 104 |
\subsection{\code{snapshot.dev}}{ |
| 105 |
|
| 106 |
Whether to include development dependencies by default when calling |
| 107 |
\code{renv::snapshot()} or \code{renv::status()}. When \code{TRUE}, development |
| 108 |
dependencies (e.g., packages listed in \code{Suggests} or development tools |
| 109 |
like \code{devtools}) will be included. Defaults to \code{FALSE}. |
| 110 |
} |
| 111 |
|
| 112 |
\subsection{\code{use.cache}}{ |
| 113 |
|
| 114 |
Enable the renv package cache with this project. When active, renv will |
| 115 |
install packages into a global cache, and link packages from the cache into |
| 116 |
your renv projects as appropriate. This can greatly save on disk space |
| 117 |
and install time when for \R packages which are used across multiple |
| 118 |
projects in the same environment. |
| 119 |
} |
| 120 |
|
| 121 |
\subsection{\code{vcs.manage.ignores}}{ |
| 122 |
|
| 123 |
Should renv attempt to manage the version control system's ignore files |
| 124 |
(e.g. \code{.gitignore}) within this project? Set this to \code{FALSE} if you'd |
| 125 |
prefer to take control. Note that if this setting is enabled, you will |
| 126 |
need to manually ensure internal data in the project's \verb{renv/} folder |
| 127 |
is explicitly ignored. |
| 128 |
} |
| 129 |
|
| 130 |
\subsection{\code{vcs.ignore.cellar}}{ |
| 131 |
|
| 132 |
Set whether packages within a project-local package cellar are excluded |
| 133 |
from version control. See \code{vignette("package-sources", package = "renv")} |
| 134 |
for more information. |
| 135 |
} |
| 136 |
|
| 137 |
\subsection{\code{vcs.ignore.library}}{ |
| 138 |
|
| 139 |
Set whether the renv project library is excluded from version control. |
| 140 |
} |
| 141 |
|
| 142 |
\subsection{\code{vcs.ignore.local}}{ |
| 143 |
|
| 144 |
Set whether renv project-specific local sources are excluded from version |
| 145 |
control. |
| 146 |
} |
| 147 |
} |
| 148 |
\section{Defaults}{ |
| 149 |
You can change the default values of these settings for newly-created renv |
| 150 |
projects by setting \R options for \code{renv.settings} or \verb{renv.settings.<name>}. |
| 151 |
For example: |
| 152 |
|
| 153 |
\if{html}{\out{<div class="sourceCode R">}}\preformatted{options(renv.settings = list(snapshot.type = "all")) |
| 154 |
options(renv.settings.snapshot.type = "all") |
| 155 |
}\if{html}{\out{</div>}} |
| 156 |
|
| 157 |
If both of the \code{renv.settings} and \verb{renv.settings.<name>} options are set |
| 158 |
for a particular key, the option associated with \verb{renv.settings.<name>} is |
| 159 |
used instead. We recommend setting these in an appropriate startup profile, |
| 160 |
e.g. \verb{~/.Rprofile} or similar. |
| 161 |
} |
| 162 |
|
| 163 |
\examples{ |
| 164 |
|
| 165 |
\dontrun{ |
| 166 |
|
| 167 |
# view currently-ignored packaged |
| 168 |
renv::settings$ignored.packages() |
| 169 |
|
| 170 |
# ignore a set of packages |
| 171 |
renv::settings$ignored.packages("devtools", persist = FALSE) |
| 172 |
|
| 173 |
} |
| 174 |
} |
| 175 |
\keyword{datasets} |