| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/migrate.R |
| 3 |
\name{migrate} |
| 4 |
\alias{migrate} |
| 5 |
\title{Migrate a project from packrat to renv} |
| 6 |
\usage{ |
| 7 |
migrate( |
| 8 |
project = NULL, |
| 9 |
packrat = c("lockfile", "sources", "library", "options", "cache") |
| 10 |
) |
| 11 |
} |
| 12 |
\arguments{ |
| 13 |
\item{project}{The project directory. If \code{NULL}, then the active project will |
| 14 |
be used. If no project is currently active, then the current working |
| 15 |
directory is used instead.} |
| 16 |
|
| 17 |
\item{packrat}{Components of the Packrat project to migrate. See the default |
| 18 |
argument list for components of the Packrat project that can be migrated. |
| 19 |
Select a subset of those components for migration as appropriate.} |
| 20 |
} |
| 21 |
\value{ |
| 22 |
The project directory, invisibly. Note that this function is normally |
| 23 |
called for its side effects. |
| 24 |
} |
| 25 |
\description{ |
| 26 |
Migrate a project's infrastructure from packrat to renv. |
| 27 |
} |
| 28 |
\section{Migration}{ |
| 29 |
When migrating Packrat projects to renv, the set of components migrated |
| 30 |
can be customized using the \code{packrat} argument. The set of components that |
| 31 |
can be migrated are as follows: |
| 32 |
|
| 33 |
\tabular{ll}{ |
| 34 |
|
| 35 |
\strong{Name} \tab \strong{Description} \cr |
| 36 |
|
| 37 |
\code{lockfile} \tab |
| 38 |
Migrate the Packrat lockfile (\code{packrat/packrat.lock}) to the renv lockfile |
| 39 |
(\code{renv.lock}). \cr |
| 40 |
|
| 41 |
\code{sources} \tab |
| 42 |
Migrate package sources from the \code{packrat/src} folder to the renv |
| 43 |
sources folder. Currently, only CRAN packages are migrated to renv -- |
| 44 |
packages retrieved from other sources (e.g. GitHub) are ignored. |
| 45 |
\cr |
| 46 |
|
| 47 |
\code{library} \tab |
| 48 |
Migrate installed packages from the Packrat library to the renv project |
| 49 |
library. |
| 50 |
\cr |
| 51 |
|
| 52 |
\code{options} \tab |
| 53 |
Migrate compatible Packrat options to the renv project. |
| 54 |
\cr |
| 55 |
|
| 56 |
\code{cache} \tab |
| 57 |
Migrate packages from the Packrat cache to the renv cache. |
| 58 |
\cr |
| 59 |
|
| 60 |
} |
| 61 |
} |
| 62 |
|
| 63 |
\examples{ |
| 64 |
\dontrun{ |
| 65 |
|
| 66 |
# migrate Packrat project infrastructure to renv |
| 67 |
renv::migrate() |
| 68 |
|
| 69 |
} |
| 70 |
} |