packrat-options {packrat} | R Documentation |
Get/set packrat project options
Description
Get and set options for the current packrat-managed project.
Usage
get_opts(options = NULL, simplify = TRUE, project = NULL)
set_opts(..., project = NULL, persist = TRUE)
opts
Arguments
options |
A character vector of valid option names. |
simplify |
Boolean; |
project |
The project directory. When in packrat mode, defaults to the current project; otherwise, defaults to the current working directory. |
... |
Entries of the form |
persist |
Boolean; persist these options for future sessions? |
Valid Options
-
auto.snapshot
: Perform automatic, asynchronous snapshots when running interactively? (logical; defaults toFALSE
) -
use.cache
: Install packages into a global cache, which is then shared across projects? The directory to use is read throughSys.getenv("R_PACKRAT_CACHE_DIR")
. Windows support is currently experimental. (logical; defaults toFALSE
) -
print.banner.on.startup
: Print the banner on startup? Can be one ofTRUE
(always print),FALSE
(never print), and'auto'
(do the right thing) (defaults to"auto"
) -
vcs.ignore.lib
: If TRUE, version control configuration is modified to ignore packrat private libraries. (logical; defaults toTRUE
) -
vcs.ignore.src
: If TRUE, version control configuration is modified to ignore packrat private sources. (logical; defaults toFALSE
) -
external.packages
: Packages which should be loaded from the user library. This can be useful for very large packages which you don't want duplicated across multiple projects, e.g. BioConductor annotation packages, or for package development scenarios wherein you want to use e.g.devtools
androxygen2
for package development, but do not want your package to depend on these packages. (character; defaults toSys.getenv("R_PACKRAT_EXTERNAL_PACKAGES")
) -
local.repos
: Ad-hoc local 'repositories'; i.e., directories containing package sources within sub-directories. (character; empty by default) -
load.external.packages.on.startup
: Load any packages specified withinexternal.packages
on startup? (logical; defaults toTRUE
) -
ignored.packages
: Prevent packrat from tracking certain packages. Dependencies of these packages will also not be tracked (unless these packages are encountered as dependencies in a separate context from the ignored package). (character; empty by default) -
ignored.directories
: Prevent packrat from looking for dependencies inside certain directories of your workspace. For example, if you have set your "local.repos" to be inside your local workspace so that you can track custom packages as git submodules. Each item should be the relative path to a directory in the workspace, e.g. "data", "lib/gitsubmodule". Note that packrat already ignores any "invisible" files and directories, such as those whose names start with a "." character. (character; empty by default) -
quiet.package.installation
: Emit output during package installation? (logical; defaults toTRUE
) -
snapshot.recommended.packages
: Should 'recommended' packages discovered in the system library be snapshotted? See thePriority
field ofavailable.packages()
for more information – 'recommended' packages are those normally bundled with CRAN releases of R on OS X and Windows, but new releases are also available on the CRAN server. (logical; defaults toFALSE
) -
snapshot.fields
: What fields of a package's DESCRIPTION file should be used when discovering dependencies? (character, defaults toc("Imports", "Depends", "LinkingTo")
) -
symlink.system.packages
: Symlink base R packages into a privatepackrat/lib-R
directory? This is done to further encapsulate the project from user packages that have been installed into the R system library. (boolean, defaults toTRUE
)
Examples
## Not run:
## use 'devtools' and 'knitr' from the user library
packrat::set_opts(external.packages = c("devtools", "knitr"))
## set local repository
packrat::set_opts(local.repos = c("~/projects/R"))
## get the set of 'external packages'
packrat::opts$external.packages()
## set the external packages
packrat::opts$external.packages(c("devtools", "knitr"))
## End(Not run)