Runs pipeline prep steps from replication.yml when present, then every
registered table and figure, and writes formatted outputs plus
manifest.json. Works for folder-backed studies (outputs/) and
package-backed studies (inst/report/outputs/ or inst/report/artifacts/).
Usage
build_study_outputs(
location = ".",
install_deps = TRUE,
ids = NULL,
registry_root = NULL,
output_dir = NULL,
force_prep = FALSE,
only_missing = FALSE
)Arguments
- location
Local study path, GitHub address, or installed package name. Defaults to
"."when the working directory containsreplication.ymlorDESCRIPTION— the same study thatdoi = "local"resolves to forlist_replications()/run_replication()/get_code().- install_deps
Logical. Install missing CRAN, pip, and Stata dependencies when
TRUE.- ids
Optional character vector of replication ids to build. When
NULL, builds every figure and table inreplication.yml.- registry_root
Optional registry checkout path for monorepo dev (folder studies only).
- output_dir
Optional output directory (package studies only). Defaults to the package report outputs directory.
- force_prep
Logical. Re-run prep steps even when outputs already exist.
- only_missing
Logical. When
TRUE, skip replications whose artifacts already exist (seeartifact_available()).
See also
build_outputs() for registry-wide or DOI-scoped builds.
Examples
if (FALSE) { # \dontrun{
# setwd() to the study repo (or open its RStudio project), then:
setwd("path/to/rep-my-study")
list_replications("local") # sanity-check before baking
build_study_outputs(".", install_deps = TRUE)
build_study_outputs(".", only_missing = TRUE)
# Sibling checkouts in a monorepo:
build_study_outputs("../rep-10.1017-S0003055403000534", install_deps = TRUE)
build_study_outputs("../rep-10.1017-s0003055422000284", install_deps = TRUE)
build_study_outputs("../rep-template", install_deps = TRUE)
} # }
