Use embed() to embed a lockfile directly within a file.
embed(path = NULL, ..., project = NULL)The path to an R or R Markdown script.
Unused arguments, reserved for future expansion. If any arguments
are matched to ..., renv will signal an error.
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.
This is primarily useful in tandem with run -- if you call renv::run()
on a script containing an inline lockfile, renv will first provision
a library based on that lockfile definition, and then run the script
using that lockfile.