snapshotImpl: Internal Snapshot Implementation

.snapshotImplR Documentation

Internal Snapshot Implementation

Description

This is the internal implementation for snapshot. Most users should prefer calling snapshot.

Usage

.snapshotImpl(
  project,
  available = NULL,
  lib.loc = libDir(project),
  dry.run = FALSE,
  ignore.stale = FALSE,
  prompt = interactive(),
  auto.snapshot = FALSE,
  verbose = TRUE,
  fallback.ok = FALSE,
  snapshot.sources = TRUE,
  implicit.packrat.dependency = 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.

dry.run

Computes the changes to your packrat state that would be made if a snapshot were performed, and prints them to the console.

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 restore. By default, packrat will prevent you from taking a snapshot when you have stale packages to prevent you from losing changes from the unapplied snapshot. If your intent is to overwrite the last snapshot without applying it, use ignore.stale = TRUE to skip this check.

prompt

TRUE to prompt before performing snapshotting package changes that might be unintended; FALSE to perform these operations without confirmation. Potentially unintended changes include snapshotting packages at an older version than the last snapshot, or missing despite being present in the last snapshot.

auto.snapshot

Internal use – should be set to TRUE when this is an automatic snapshot.

verbose

Print output to the console while snapshot-ing?

fallback.ok

Fall back to the latest CRAN version of a package if the locally installed version is unavailable?

snapshot.sources

Download the tarball associated with a particular package?

implicit.packrat.dependency

Include packrat as an implicit dependency of this project, if not otherwise discovered? This should be FALSE only if you can guarantee that packrat will be available via other means when attempting to load this project.

infer.dependencies

If TRUE, infer package dependencies by examining the R code.


rstudio/packrat documentation built on Feb. 5, 2024, 9:17 p.m.