restore: Restore a Project

Description Usage Arguments Actions See Also

Description

Restore a project's dependencies from a lockfile, as previously generated by snapshot().

Usage

1
2
3
restore(project = NULL, library = NULL, lockfile = NULL,
  actions = c("install", "remove", "upgrade", "downgrade", "crossgrade"),
  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 path to the library in which packages will be restored. When NULL, the project library is used.

lockfile

The lockfile to be used for restoration of the associated project. When NULL, the most recently generated lockfile for this project is used.

actions

The restore actions to take. By default, all actions are taken, thereby synchronizing the state of the project library with that of the lockfile. See Actions for more details.

confirm

Boolean; prompt the user before taking any action?

Actions

renv classifies the different actions that will be taken during restore into five fundamental types:

install Install a package recorded in the lockfile, but not currently installed in the project library.
remove Remove a package installed in the project library, but not currently recorded in the lockfile.
upgrade Upgrade a package by replacing the (older) version of the package available in the project library with a newer version as defined in the lockfile.
downgrade Downgrade a package by replacing the (newer) version of the package available in the project library with an older version as defined in the lockfile.
crossgrade Install a package whose lockfile record differs from the inferred record associated with the currently-installed version. This could happen if, for example, the source of a particular package was changed (e.g. a package originally installed from GitHub was later installed from CRAN).

This can be useful if you want to perform only non-destructive changes during restore – for example, you can invoke renv::restore(actions = "install") to avoid modifying or removing packages that have already been installed into your project's private library.

See Also

Other reproducibility: lockfile, snapshot


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