22 lines
323 B
Plaintext
22 lines
323 B
Plaintext
---
|
|
output: html_document
|
|
params:
|
|
my_class: "suv"
|
|
---
|
|
|
|
```{r setup, include = FALSE}
|
|
library(ggplot2)
|
|
library(dplyr)
|
|
|
|
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)
|
|
```
|
|
|