replicateEverything separates readers (browse, Run) from maintainers (onboard a study or server). Live Run and Shiny probe dependencies only — they never install R, Python, or Stata packages on the host. Maintainers install once during setup.
Check system compatibility (no installs)
Before running tables or figures, confirm the machine matches what
replication.yml declares:
check_study_compatibility("10.1017/S0003055426101749")The returned list includes ready (logical),
install_needed, and per-engine blocks under
dependencies (r, python,
stata).
In Shiny, use Check system compatibility above the tables list. When something is missing, a dialog shows the same maintainer commands documented here.
Install dependencies for one study
Use one function for folder-backed and
package-backed registry studies (R CRAN, Python pip, Stata
install_stata_deps.do):
install_dependencies("10.1017/S0003055426101749")
install_dependencies("10.1371/journal.pone.0278337") # package-backed too
install_dependencies("path/to/study-repo")This does not rebuild display artifacts — only dependencies. After setup, build artifacts with the kind-specific builder (paths differ by design):
build_study_outputs("path/to/folder-study", install_deps = TRUE)
build_study_outputs("rep1371journalpone0278337", install_deps = TRUE)Folder-backed studies write under outputs/;
package-backed studies use inst/report/outputs/ (or legacy
inst/report/artifacts/).
Install dependencies for every registry study
On a shared audit or Shiny server, run once:
install_dependencies("everywhere")Covers folder- and package-backed entries. Failures are collected per DOI; other studies continue.
Point R at Python and Stata permanently
Session options() are not the right place for production
servers. Set environment variables in
~/.Renviron and restart R:
PYTHON=C:/Users/you/AppData/Local/Python/pythoncore-3.14-64/python.exe
STATA=C:/Program Files/Stata17/StataMP-64.exe
On Linux or macOS, use the corresponding paths (for example
/usr/bin/python3 or
/Applications/Stata/StataMP.app/Contents/MacOS/stata-mp).
In R you can open the file with
usethis::edit_r_environ() if you use
usethis.
Priority order:
| Engine | Permanent config | Fallback |
|---|---|---|
| Python |
PYTHON or RETICULATE_PYTHON in
.Renviron
|
Windows py -0p installs, then PATH
|
| Stata |
STATA or REPLICATE_STATA_EXECUTABLE in
.Renviron
|
options(replicateEverything.stata_executable), then
common install paths |
What happens on Run
When a reader calls run_replication() or Shiny
Run, the package:
- Checks declared dependencies
(
assert_study_ready_for_replication()). - Stops with [maintainer_dependency_hint()] if anything is missing.
- Runs the replication without installing packages.
Maintainers see the same hint text in the console, in Shiny modals,
and via maintainer_dependency_hint():
maintainer_dependency_hint("10.1017/S0003055426101749")See also Meet the functions, the folder replication
checklist, and inst/ai/skills/include_study_in_registry.md
for contributor vs maintainer registry workflows.
Register studies in the central registry (maintainer)
There is no study-local registry handoff — not
registry/ in a folder-backed repo, not
inst/registry/ in a package. Contributors validate with
[check_and_bake_study()]; a maintainer with a local checkout of the registry
repository writes the stub directly from the study’s own
replication.yml with [sync_study_to_registry()] —
nothing is copied from the study repo.
Point R at your monorepo checkout:
options(replicateEverything.registry_root = "../registry")Sync one study — build
registry/studies/<folder>.yml from the study’s root
yaml and rebuild index.csv:
sync_study_to_registry(
"../rep-10.1177-00491241211036161",
registry_root = "../registry"
)Optional per-study audit after sync (upserts that DOI into
audit_jobs.csv; does not wipe the
portfolio health bar):
sync_study_to_registry(
"../rep-10.1177-00491241211036161",
registry_root = "../registry",
audit = TRUE,
patience = 20
)Refresh the whole registry after a batch of syncs —
recompile index.csv from all stubs and rerun
[audit_everything()]:
refresh_registry("../registry", audit = TRUE, patience = 20)Audit disk layout (as of 0.7.40):
registry/audit_jobs.csv is the source of truth (upsert by
doi × object × engine). Derived audit_summary.json /
audit_latest.rds are rebuilt from the full
CSV after each write. To fill gaps without live runs, use
[seed_registry_audit_jobs()]; to rebuild JSON/RDS only,
[refresh_registry_audit_summary()]. Commit audit_jobs.csv
together with the derived JSON and RDS (and the Quarto HTML if you
publish the registry report). See vignette("audit") and
registry/guides/registry-management.md.
One call, check + sync: [register_study()] runs
check_and_bake_study() then
sync_study_to_registry() for both folder- and
package-backed studies:
register_study(
"../rep-10.1177-00491241211036161",
registry_root = "../registry",
audit = TRUE
)Check precomputed outputs
After building display files, confirm every declared table and figure exists on disk (Shiny Display mode). This does not run live replications.
validate_outputs(location = "../rep-10.1177-00491241211036161")
validate_outputs("10.1177/00491241211036161", what = "everything")Registry-wide check from a monorepo checkout:
options(replicateEverything.registry_root = "../registry")
validate_outputs(doi = "everywhere", what = "everything")Or from the registry repo:
Rscript scripts/validate_outputs.R.
Summary
| Task | Function |
|---|---|
| Probe this machine | check_study_compatibility(doi) |
| Install one study (all kinds, all languages) | install_dependencies(doi) |
| Install entire registry | install_dependencies("everywhere") |
| Build study outputs | build_study_outputs(location, install_deps = TRUE) |
| Validate study | check_replication(location) |
| Check precomputed outputs |
validate_outputs(location) or
validate_outputs(doi, what = "everything")
|
| Registry-wide output check | validate_outputs(doi = "everywhere", what = "everything") |
| Hint text for errors / UI | maintainer_dependency_hint(doi) |
| Contributor: validate (+ optional bake) | check_and_bake_study(path) |
| Maintainer: sync stub into registry | sync_study_to_registry(path, registry_root = ...) |
| Maintainer: validate then sync in one call | register_study(path, registry_root = ...) |
| Maintainer: rebuild index + audit all | refresh_registry(registry_root, audit = TRUE) |
| Rebuild index only | build_registry_index(registry_root) |
| Seed audit CSV (no live runs) | seed_registry_audit_jobs(registry_root) |
| Rebuild audit JSON/RDS from CSV | refresh_registry_audit_summary(registry_root) |
Package website (pkgdown)
The site is served from docs/ on
main (GitHub Pages → /docs). CI does
not build or deploy it.
# from replicateEverything/
Rscript scripts/build_pkgdown.R
# then: git add docs/ && git commit && git pushCommit the entire docs/ tree
(deps/, articles/, reference/,
…). Pushing only index.html breaks Bootstrap styling on
GitHub.
Windows + Dropbox: if the repo lives under Dropbox,
pkgdown may fail while writing docs/articles/*.html
(e.g. audit.html) with Invalid argument [1515]
/ Error closing file. Pause Dropbox, exclude
docs/ from selective sync, or clone and build outside
Dropbox. scripts/build_pkgdown.R deletes cached article
HTML first when it detects a Dropbox path.
