snapshot {packrat} | R Documentation |
Capture and store the packages and versions in use
Description
Finds the packages in use in the project, and stores a list of those packages, their sources, and their current versions in packrat.
Usage
snapshot(
project = NULL,
available = NULL,
lib.loc = libDir(project),
ignore.stale = FALSE,
dry.run = FALSE,
prompt = interactive(),
snapshot.sources = TRUE,
infer.dependencies = TRUE
)
Arguments
project |
The project directory. Defaults to current working directory. |
available |
A database of available packages. |
lib.loc |
The library to snapshot. Defaults to the private library associated with the given directory. |
ignore.stale |
Stale packages are packages that are different from the
last snapshot, but were installed by packrat. Typically, packages become
stale when a new snapshot is available, but you haven't applied it yet with
|
dry.run |
Computes the changes to your packrat state that would be made if a snapshot were performed, and prints them to the console. |
prompt |
|
snapshot.sources |
Boolean; should package sources be downloaded during snapshot? |
infer.dependencies |
If |
Note
snapshot
modifies the project's packrat.lock
file, and
the sources stored in the project's packrat/src
directory. If you
are working with a version control system, your collaborators can sync the
changes to these files and then use restore
to apply your
snapshot.
See Also
restore
to apply a snapshot.
status
to view the differences between the most recent snapshot
and the library.
Examples
## Not run:
# Take a snapshot of the current project
snapshot()
# See what changes would be included in a snapshot
snapshot(dry.run = TRUE)
## End(Not run)