Building our presentation with R Markdown
In this section, we will develop our presentation's R Markdown file. We create an empty file named presentation.R
and put the following headers in. The quotation marks are not required unless you want to include a colon in the title. As shown in a previous section, using backticks (“ ’), we can execute R code. In this case, we put the current date automatically in the front page. Finally, we chose ioslides_presentation
as an output format. Feel free to experiment with the other outputs shown previously:
--- title: "The Food Factory" author: "Weekly Update" date: "`r Sys.Date()`" output: ioslides_presentation ---
The following code sets up the default configuration for the code chunks in our presentation. We avoid showing code in the presentation with echo = FALSE
and make each picture full width unless stated otherwise with out.width = '100%'
:
```{r setup, include=FALSE} knitr::opts_chunk$set(echo = FALSE, out.width = '100%') ```
Now, we need to bring...