lockfile_create {pak} | R Documentation |
Create a lock file
Description
The lock file can be used later, possibly in a new R session, to carry
out the installation of the dependencies, with
lockfile_install()
.
Usage
lockfile_create(
pkg = "deps::.",
lockfile = "pkg.lock",
lib = NULL,
upgrade = FALSE,
dependencies = NA
)
Arguments
pkg |
Package names or package references. E.g.
See "Package sources" for more details. |
lockfile |
Path to the lock file. |
lib |
Package library to install the packages to. Note that all
dependent packages will be installed here, even if they are
already installed in another library. The only exceptions are base
and recommended packages installed in |
upgrade |
When When |
dependencies |
What kinds of dependencies to install. Most commonly one of the following values:
|
Details
Note, since the URLs of CRAN and most CRAN-like repositories change over time, in practice you cannot use the lock file much later. For example, binary packages of older package version might be deleted from the repository, breaking the URLs in the lock file.
Currently the intended use case of lock files in on CI systems, to facilitate caching. The (hash of the) lock file provides a good key for caching systems.
See Also
Other lock files:
lockfile_install()