File: packrat-options.Rd

package info (click to toggle)
r-cran-packrat 0.9.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,900 kB
  • sloc: sh: 51; makefile: 5
file content (118 lines) | stat: -rw-r--r-- 4,915 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/options.R
\docType{data}
\name{packrat-options}
\alias{packrat-options}
\alias{get_opts}
\alias{set_opts}
\alias{opts}
\title{Get/set packrat project options}
\usage{
get_opts(options = NULL, simplify = TRUE, project = NULL)

set_opts(..., project = NULL, persist = TRUE)

opts
}
\arguments{
\item{options}{A character vector of valid option names.}

\item{simplify}{Boolean; \code{unlist} the returned options? Useful for when retrieving
a single option.}

\item{project}{The project directory. When in packrat mode, defaults to the current project;
otherwise, defaults to the current working directory.}

\item{...}{Entries of the form \code{key = value}, used for setting packrat project options.}

\item{persist}{Boolean; persist these options for future sessions?}
}
\description{
Get and set options for the current packrat-managed project.
}
\section{Valid Options}{


\itemize{
\item \code{auto.snapshot}: Perform automatic, asynchronous snapshots when running interactively?
  (logical; defaults to \code{FALSE})
\item \code{use.cache}:
  Install packages into a global cache, which is then shared across projects? The
  directory to use is read through \code{Sys.getenv("R_PACKRAT_CACHE_DIR")}.
  Windows support is currently experimental.
  (logical; defaults to \code{FALSE})
\item \code{print.banner.on.startup}:
  Print the banner on startup? Can be one of \code{TRUE} (always print),
  \code{FALSE} (never print), and \code{'auto'} (do the right thing)
  (defaults to \code{"auto"})
\item \code{vcs.ignore.lib}:
  If TRUE, version control configuration is modified to ignore packrat private libraries.
  (logical; defaults to \code{TRUE})
\item \code{vcs.ignore.src}:
  If TRUE, version control configuration is modified to ignore packrat private sources.
  (logical; defaults to \code{FALSE})
\item \code{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. \code{devtools} and \code{roxygen2} for package
  development, but do not want your package to depend on these packages.
  (character; defaults to \code{Sys.getenv("R_PACKRAT_EXTERNAL_PACKAGES")})
\item \code{local.repos}:
  Ad-hoc local 'repositories'; i.e., directories containing package sources within
  sub-directories.
  (character; empty by default)
\item \code{load.external.packages.on.startup}:
  Load any packages specified within \code{external.packages} on startup?
  (logical; defaults to \code{TRUE})
\item \code{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)
\item \code{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)
\item \code{quiet.package.installation}:
  Emit output during package installation?
  (logical; defaults to \code{TRUE})
\item \code{snapshot.recommended.packages}:
  Should 'recommended' packages discovered in the system library be
  snapshotted? See the \code{Priority} field of \code{available.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 to \code{FALSE})
\item \code{snapshot.fields}:
  What fields of a package's DESCRIPTION file should be used when discovering
  dependencies?
  (character, defaults to \code{c("Imports", "Depends", "LinkingTo")})
\item \code{symlink.system.packages}:
  Symlink base \R packages into a private \code{packrat/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 to \code{TRUE})
}
}

\examples{
\dontrun{
## 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"))
}
}
\keyword{datasets}