Generate lockfile for application's environment reproducibility
Source:R/module_teal_lockfile.R
module_teal_lockfile.Rd
Generate lockfile for application's environment reproducibility
Usage
ui_teal_lockfile(id)
srv_teal_lockfile(id)
.teal_lockfile_process_invoke(lockfile_path)
.renv_snapshot(lockfile_path)
.is_lockfile_deps_installed()
.is_disabled_lockfile_scenario()
Different ways of creating lockfile
teal
leverages renv::snapshot()
, which offers multiple methods for lockfile creation.
Working directory lockfile:
teal
, by default, will create animplicit
type lockfile that usesrenv::dependencies()
to detect all R packages in the current project's working directory.DESCRIPTION
-based lockfile: To generate a lockfile based on aDESCRIPTION
file in your working directory, setrenv::settings$snapshot.type("explicit")
. The naming convention fortype
followsrenv::snapshot()
. For the"explicit"
type, refer torenv::settings$package.dependency.fields()
for theDESCRIPTION
fields included in the lockfile.Custom files-based lockfile: To specify custom files as the basis for the lockfile, set
renv::settings$snapshot.type("custom")
and configure therenv.snapshot.filter
option.
lockfile usage
After creating the lockfile, you can restore the application's environment using renv::restore()
.