snapshot: Snapshot a Project

Description Usage Arguments Details See Also

Description

Call snapshot() to create a lockfile capturing the state of a project's R package dependencies. The lockfile can be used to later restore these project's dependencies as required. See the lockfile documentation for more details on the structure of a lockfile.

Usage

1
2
snapshot(project = NULL, library = NULL,
  lockfile = file.path(project, "renv.lock"), confirm = interactive())

Arguments

project

The project directory. If NULL, then the active project will be used. If no project is currently active, then the current working directory is used instead.

library

The R library to snapshot. When NULL, the active library (as reported by .libPaths()) is used.

lockfile

The location where the generated lockfile should be written. By default, the lockfile is written to a file called renv.lock in the project directory. When NULL, the lockfile (as an R object) is returned directly instead.

confirm

Boolean; prompt the user before taking any action?

Details

When no project library is active, snapshot() will capture only the packages within use (as detected by dependencies()) within a project.

See Also

Other reproducibility: lockfile, restore


slopp/renv documentation built on July 6, 2019, 12:08 a.m.