--- title: "Penguins — single-species report" format: html params: species: Gentoo --- ```{r} #| label: setup #| message: false library(dplyr) library(ggplot2) data(penguins) one <- penguins |> filter(species == params$species, !is.na(bill_len), !is.na(bill_dep)) ``` This report covers **`{r} params$species`** penguins only. Passing `species` as a **parameter** lets the same source file render one report per species. ## `{r} params$species` at a glance ```{r} #| label: fig-bill #| echo: false #| fig-cap: !expr paste0("Bill length versus depth for ", params$species, " penguins.") #| fig-alt: !expr paste0("Scatter plot of bill depth against bill length for ", params$species, " penguins. Each point is one bird.") ggplot(one, aes(bill_len, bill_dep)) + geom_point(alpha = 0.8) + labs(x = "Bill length (mm)", y = "Bill depth (mm)") + theme_minimal(base_size = 12) ``` `{r} nrow(one)` `{r} params$species` penguins had both bill measurements recorded. ## Session {.appendix .unnumbered}
Session info ```{r} #| label: session sessionInfo() ```