build-parameterized-report

Solid

Create parameterized Quarto or R Markdown reports that can be rendered with different inputs to generate multiple variations. Covers parameter definitions, programmatic rendering, and batch generation. Use when generating the same report for different departments, regions, or time periods; creating client-specific reports from a single template; building dashboards that filter to specific subsets; or automating recurring reports with varying inputs.

Data & Documents 26 stars 4 forks Updated today MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
48
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Build Parameterized Report Create reports that accept parameters to generate multiple customized variations from a single template. ## When to Use - Generating the same report for different departments, regions, or time periods - Creating client-specific reports from a template - Building dashboards that filter to specific subsets - Automating recurring reports with different inputs ## Inputs - **Required**: Report template (Quarto or R Markdown) - **Required**: Parameter definitions (names, types, defaults) - **Optional**: List of parameter values for batch generation - **Optional**: Output directory for generated reports ## Procedure ### Step 1: Define Parameters in YAML For Quarto (`report.qmd`): ```yaml --- title: "Sales Report: `r params$region`" params: region: "North America" year: 2025 include_forecast: true format: html: toc: true --- ``` For R Markdown (`report.Rmd`): ```yaml --- title: "Sales Report" params: region: "North America" year: 2025 include_forecast: true output: html_document --- ``` **Got:** The YAML header contains a `params:` block with named parameters, each having a default value of the correct type. **If fail:** If rendering fails with "object 'params' not found", ensure the `params:` block is correctly indented under the YAML frontmatter. For Quarto, `params` must be at the top level of the YAML, not nested under `format:`. ### Step 2: Use Parameters in Code ````markdown ```{r} #| label: filter-data data <- full...

Details

Author
pjt222
Repository
pjt222/agent-almanac
Created
1 years ago
Last Updated
today
Language
R
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category