Grades how well the submission captures its package environment, because a
reviewer must be able to reinstall the exact software stack. FDA review
guidance stresses that a version-pinned, transitive lockfile (renv.lock) is
what makes this possible, and that a plain top-level dependency list is not
enough. Returns R4SUB evidence with indicator_id = "R-REPRO-001":
Arguments
- path
Path to the submission's analysis code folder.
- ctx
A run context from
r4subcore::r4sub_run_context(). WhenNULLa default context is created from the folder name.- config
A configuration from
repro_config_default(). WhenNULLthe default configuration is used.
Value
A validated evidence table (see r4subcore::as_evidence()).
Details
pass - a version-pinned
renv.lock(or apackratlockfile) is present.warn - an
renv.lockwith no package versions (a stub), or only aDESCRIPTIONdependency list, which is not version-pinned.fail - no captured environment at all.
Examples
d <- file.path(tempdir(), "sub001")
dir.create(d, showWarnings = FALSE)
writeLines(c('{ "R": { "Version": "4.4.1" },',
' "Packages": { "dplyr": { "Package": "dplyr", "Version": "1.1.4" } } }'),
file.path(d, "renv.lock"))
ev <- suppressMessages(assess_env_lockfile(d))
ev$result
#> [1] "pass"