Copies a ready-to-render Quarto report skeleton into your project, wired up
with ezrsurvey helpers against the bundled podracing_survey data: an
executive summary, per-question sections with placeholder narrative, and a
methodology appendix built from the
precision diagnostics. Swap in your own data via the data parameter (or
at the top of the file) and render with Quarto. This is the document-driven
counterpart to the report_new() / report_deck() officer builders.
Usage
scaffold_report(
format = c("pptx", "html", "pdf", "docx"),
path = NULL,
title = "Survey Report",
author = NULL,
reference_doc = NULL,
overwrite = FALSE
)Arguments
- format
Output format: one of
list_report_templates()("pptx","html","pdf","docx"). Defaults to"pptx".- path
Destination
.qmdpath.NULL(default) writessurvey-report-<format>.qmd. A bare file name lands inezrsurvey-outputs/(created on demand), so the scaffold sits where its rendered output will; a path naming a directory ("./x.qmd","reports/x.qmd", anything absolute) is used exactly as given. See theoutput_diroption.- title
Title inserted into the template's YAML header.
Author name for the YAML header.
NULLleaves a placeholder.- reference_doc
Path to a PowerPoint / Word template used as the Quarto
reference-doc(pptx and docx formats only).NULL(default) uses the brand template registered byuse_brand(), if any; pptx then falls back to the package's built-in 16:9 template, docx leaves the line commented in the scaffold.- overwrite
Overwrite
pathif it already exists. Defaults toFALSE.
Details
Each scaffold declares one Quarto parameter: data, the path to a CSV of
your survey; empty means the bundled example data.
Corporate templates: Quarto/Pandoc fills a reference-doc by looking
for the standard layout names ("Title Slide", "Title and Content", "Two
Content", ...). A corporate template whose layouts keep those names works
directly; one with renamed layouts will render broken or blank slides here
– build the deck with report_deck() instead, which inspects placeholders
and works with any template.
See also
report_deck() for building decks directly without Quarto;
use_brand() to register a default reference document.
Other reporting:
example_report(),
list_report_templates(),
report_add_plot(),
report_add_slide(),
report_add_table(),
report_add_text(),
report_deck(),
report_layouts(),
report_new(),
report_save(),
report_section(),
report_slide(),
report_title_slide()
Examples
tmp <- tempfile(fileext = ".qmd")
scaffold_report("html", path = tmp, title = "Q2 Customer Survey")
file.exists(tmp)
#> [1] TRUE
# a bare name instead lands in ezrsurvey-outputs/, beside its render:
# scaffold_report("html", title = "Q2 Customer Survey")
# quarto::quarto_render("ezrsurvey-outputs/survey-report-html.qmd")
