lockfile-api | R Documentation |
This function provides an API for creating and modifying renv
lockfiles.
This can be useful when you'd like to programmatically generate or modify
a lockfile – for example, because you want to update or change a package
record in an existing lockfile.
lockfile(file = NULL, project = NULL)
file |
The path to an existing lockfile. When no lockfile is provided,
a new one will be created based on the current project context. If you
want to create a blank lockfile, use |
project |
The project directory. If |
lockfiles
, for a description of the structure of an
renv
lockfile.
## Not run:
lock <- lockfile("renv.lock")
# set the repositories for a lockfile
lock$repos(CRAN = "https://cran.r-project.org")
# depend on digest 0.6.22
lock$add(digest = "digest@0.6.22")
# write to file
lock$write("renv.lock")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.