Using the xaringan package, you can construct beautiful presentations using R. Essentially, the RMarkdown syntax is used to add text, tables and figures.
Syntax summary
Titles
Set titles.
Highlight
Highlight words in italic or bold font.
Lists
You can choose between three different types of lists: hyphens, numbered and bullets.
Hyphens
Numbered
Bullets
Add images
Although you can add images directly with markdown, I recommend using knitr to include images using r code. This way you can better control the size of the image (instead of using directly its size) and setting other options as its alignment.
Two columns
There are two default styles to set the objects inside the slides in a two-column format:
The first one puts your slides in two columns with each one expanding aprox. 50 % of the total width of the slide
The second one puts your slides in two columns with the first expanding aprox. 25 % of the total width of the slide, and the second, 75 %.
Changing slide class
You can add special slides with a different theme than the default. One commonly used is the ‘inverse’ class, which is the theme used for the starting slide. Additionally, you can set other classes such as ‘center’ or ‘bottom’ or combine them to set the position of the text.
Background images
You can add images as background for certain slides by selecting the image and setting its position and size.
Tables
You can use kable inside the knitr package to draw formatted tables.
Formulas
You can add formulas or use mathematica notation using $$ $$ for equations or $ $ for mathematical notations.
Knit
Finally, when the document is ready, knit the document (string ball icon in Rstudio) to create the html file with the slides.
Minimal example
The result is the following (click on the following broken link image to view the pdf presentation).