25 lines
322 B
Plaintext
25 lines
322 B
Plaintext
---
|
|
output: html_document
|
|
params:
|
|
my_class: "suv"
|
|
---
|
|
|
|
```{r}
|
|
#| label: setup
|
|
#| include: false
|
|
|
|
library(tidyverse)
|
|
|
|
class <- mpg |> filter(class == params$my_class)
|
|
```
|
|
|
|
# Fuel economy for `r params$my_class`s
|
|
|
|
```{r}
|
|
#| message: false
|
|
|
|
ggplot(class, aes(displ, hwy)) +
|
|
geom_point() +
|
|
geom_smooth(se = FALSE)
|
|
```
|