These provide top-level, powerful settings for a comprehensive
reproducible workflow. To see defaults, run
See Details below.
Below are options that can be set with
options("Require.xxx" = newValue),
xxx is one of the values below, and
newValue is a new value to
give the option. Sometimes these options can be placed in the user's
file so they persist between sessions.
The following options are likely of interest to most users:
NULL. If a folder is provided, then binary and source packages will
be cached here. Subsequent downloads of same package will use local copy. Default
is to have packages not be cached locally so each install of the same version will
be from the original source, e.g., CRAN, GitHub.
TRUE. Only relevant on *nix systems and if
getOption("Require.RPackageCache") is set to a path. If
Require will pass
INSTALL_OPTS = "--build", meaning the
package binary will be built and then saved in the
getOption("Require.RPackageCache"). This means that subsequent installs
of this package on this or identical system will be faster.
FALSE. (ADVANCED USE)
Require stashes a lot of information in a
hidden environment, located at
Require:::.pkgEnv. This gets reset at each
restart of R and each reload of Require. To make the stashes more persistent,
set this option to
TRUE. A file will be placed at
file.path("~", "._Require_pkgEnv.rdata"), which will be restored at package load
FALSE. If set to (almost) all internal caches used by
will be deleted and rebuilt. This should not generally be necessary as it will
automatically be deleted after (by default) 1 hour (set via
R_AVAILABLE_PACKAGES_CACHE_CONTROL_MAX_AGE environment variable in seconds)
TRUE. (ADVANCED USE)
Require will attempt to detach and unload
packages that conflict with the requested package installing via
This can be complicated, resulting in broken states that can only be recovered
by restarting R. Default is to attempt to do this.
FALSE will not attempt
to do this. User must deal with inability to install packages due to package already
0. During a
Require, there is a lot of information collected
and used. With
verbose set to
2, more of this information
will be reported as an attribute attached to the return object of
This may help diagnosing problems.