Skip to content
R for the Rest of Us Logo

R in 3 Months (Fall 2025)

Parameterized Reporting, Part 3

Transcript

Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.

View code shown in video
library(quarto)
library(tidyverse)
library(gapminder)

countries <-
  gapminder |>
  distinct(country) |>
  pull(country) |>
  as.character()

reports <-
  tibble(
    input = "example-report.qmd",
    output_file = str_glue("{countries}.html"),
    execute_params = map(countries, ~ list(country = .))
  )

pwalk(reports, quarto_render)

Your Turn

  1. Open the file called render-part-2.R.

  2. Replace all instances of TODO with the correct text.

  3. Render your reports.

Have any questions? Put them below and we will help you out!

You need to be signed-in to comment on this post. Login.

Course Content

128 Lessons