These provide top-level, powerful settings for a comprehensive reproducible workflow. To see defaults, run RequireOptions(). See Details below.



Below are options that can be set with options("" = newValue), where 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 .Rprofile file so they persist between sessions.

The following options are likely of interest to most users:


Default: 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.


Default: TRUE. Only relevant on *nix systems and if getOption("Require.RPackageCache") is set to a path. If TRUE, then 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.


Default: 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


Default: FALSE. If set to (almost) all internal caches used by Require 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)


Default: TRUE. Logical. Once setup is called, there are several important changes that are made to the user's experience. For beginners with Require, the messages that are written are important to see. However, these can be turned off setting this to FALSE


Default: TRUE. (ADVANCED USE) Require will attempt to detach and unload packages that conflict with the requested package installing via Require. 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 being loaded.


Default: 0. During a Require, there is a lot of information collected and used. With verbose set to 1 or 2, more of this information will be reported as an attribute attached to the return object of Require. This may help diagnosing problems.