Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

23 lines (19 sloc) 553 Bytes
---
title: "Visualize Data"
params:
input_file: "data.csv"
---
## Load libraries
```{r setup, include=FALSE}
library(readr)
library(ggplot2)
```
We defined the `input_file` parameter in the YAML header. This is documented
in the [Rmarkdown user guide](https://bookdown.org/yihui/rmarkdown/parameterized-reports.html).
## Generate plot
Now, we'll read-in the data and visualize it using `ggplot2`.
```{r, message=FALSE}
iris_df = read_csv(params$input_file)
ggplot(iris_df, aes(x=sepal_width, y=sepal_length, color=species)) +
geom_point()
```
You can’t perform that action at this time.