Kolkata useR! Group talk
Welcome

Nithin M
Assistant Professor, Kerala Agricultural University
Doctoral Student, Economics
Indian Institute of Technology Kharagpur
map()map2()pmap()imap()walk()map(.x, .f, ...)map2(.x, .y, .f, ...)pmap(.l, .f, ...)imap(.x, .f, ...)map2, but .y = names(.x)walk(.x, .f, ...)In Quarto while using R, you can define parameters in the YAML header of your document and then access those parameters within your R code chunks.
---
params:
alpha: 0.1
ratio: 0.1
---
Automation Levels
Parameterized Report in Action
Our roadmap
Setting and using parameters: Parameters are defined in the YAML header (Knitr) or parameters cell (Jupyter). They are accessed in the report content and code chunks.
Rendering one-at-a-time: Render reports one at a time by changing parameters manually or using command-line tools.
Rendering all at once: Automate the rendering of all report variations with a script.
Parameters are defined and accessed differently depending on whether you use the Knitr or Jupyter engine.
quarto render template.qmd -P year:2022 -P species:Adelie
create a YAML file (e.g., params.yaml) with the following content:
year: 2022
species: Adelie
Then render the document using:
quarto render template.qmd --execute-params params.yml
library(quarto)
quarto::quarto_render(
input = "template.qmd",
execute_params = list(
year = 2022,
producer_id = "XYZ01"
)
)
use quarto_render() in R or a shell script to automate rendering all variations of your report using purrr::pmap()/purrr::pwalk().
A full workflow
Parameterized reports are magic! ✨
Live Demo
Questions
Thank You! 🙏
Dynamic Documents in Quarto