Maintainer helper: runs registered table and figure replications and writes
formatted outputs to disk (folder-backed studies: study repo outputs/;
package-backed: installed package report outputs). Mirrors validate_outputs()
dispatch for registry-wide or single-study builds.
Usage
build_outputs(
doi = NULL,
what = NULL,
location = NULL,
registry_root = NULL,
folders = NULL,
repo = NULL,
folder = NULL,
language = NULL,
install_deps = TRUE,
only_missing = FALSE,
force_prep = FALSE
)Arguments
- doi
Character DOI, or
"everywhere"to build every registry study that is cloned locally in the monorepo (skips and lists studies without a local checkout). Ignored whenlocationis set.- what
Replication id, or
"everything"(default whendoiorlocationis set) to build every table and figure in scope.- location
Local study path or GitHub address. When set, builds outputs for that study repository (equivalent to passing its DOI with
what = "everything").- registry_root
Optional registry checkout for monorepo dev. Used with
doi = "everywhere"orlocation.- folders
Optional character vector of registry folder names when
doi = "everywhere". Defaults to allstudies/*.ymlstubs.- repo
Optional repository slug.
- folder
Optional registry folder name (for a single
doi).- language
Optional engine language for multi-engine replications.
- install_deps
Logical. Install missing dependencies when
TRUE.- only_missing
Logical. When
TRUE, skip replications whose artifacts already exist (seeartifact_available()).- force_prep
Logical. Re-run prep steps even when outputs already exist.
Value
Invisibly TRUE on success for a single study, or (when
doi = "everywhere") a list with built, skipped, and
failures.
Examples
if (FALSE) { # \dontrun{
build_outputs(doi = "10.1177/00491241211036161", what = "fig_1")
build_outputs(doi = "10.1017/S0003055403000534", what = "tab_1")
build_outputs(doi = "10.1017/S0003055422000284", what = "everything")
build_outputs(doi = "rep-template", what = "tab_1")
build_outputs(location = ".")
build_outputs(doi = "10.1257/aer.91.5.1369", what = "tab_1", only_missing = TRUE)
options(replicateEverything.registry_root = "../registry")
build_outputs(doi = "everywhere", what = "everything")
build_outputs(doi = "everywhere", folders = "10.1017_s0003055403000534")
} # }
