An ever-increasing portion of our knowledge is deposited on those horizontal decks, usually written in really unreadable 8-point characters.
Even if criticism on the bad use of slides is growing (see, for instance, the great book Presentation Zen by Garr Reynolds) at the moment, you will still have to face that fatal request, “Could you prepare a deck on that job you have done?."
So, why miss the opportunity to do it directly within your coding best friend, RStudio?
Here, I will show you how to prepare a nice deck of slides within the IDE, leveraging the R Markdown language once again.
You can preview you slides through the knit HTML control on the upper bar or simply by using Ctrl + Shift + K.
--- title: “slides” author: “Andrea Cirillo” date: “27 February 2016” output: ioslides_presentation: logo: aclogo.png ---
Enabling captions on figures involves specifying it within the metadata of your slides, where we put the logo source path. The caption option is specified using the following code:
fig_caption: yes
You can now add a caption to a figure, making it explicit within the chunk containing the plot, as shown in the following chunk:
```{r pressure, fig.cap = “pressure plot”} plot(pressure) ```
You can render your slides through the knit HTML control on the upper bar or simply by using Ctrl + Shift + K.
Once your slides are rendered, hit the Open button in the browser, and when in the browser, save your page. This can be done with cmd + S on Mac and Shift + F12 on Windows.