Learn R Programming

renv (version 1.0.7)

migrate: Migrate a project from packrat to renv

Description

Migrate a project's infrastructure from packrat to renv.

Usage

migrate(
  project = NULL,
  packrat = c("lockfile", "sources", "library", "options", "cache")
)

Value

The project directory, invisibly. Note that this function is normally called for its side effects.

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.

packrat

Components of the Packrat project to migrate. See the default argument list for components of the Packrat project that can be migrated. Select a subset of those components for migration as appropriate.

Migration

When migrating Packrat projects to renv, the set of components migrated can be customized using the packrat argument. The set of components that can be migrated are as follows:

NameDescription
lockfileMigrate the Packrat lockfile (packrat/packrat.lock) to the renv lockfile (renv.lock).
sourcesMigrate package sources from the packrat/src folder to the renv sources folder. Currently, only CRAN packages are migrated to renv -- packages retrieved from other sources (e.g. GitHub) are ignored.
libraryMigrate installed packages from the Packrat library to the renv project library.
optionsMigrate compatible Packrat options to the renv project.
cacheMigrate packages from the Packrat cache to the renv cache.

Examples

Run this code
if (FALSE) {

# migrate Packrat project infrastructure to renv
renv::migrate()

}

Run the code above in your browser using DataLab