As a LaTeX fan, I started early to write my presentations with the
Beamer document class. Unfortunately, the default classes are starting to look rather antique today and lack the possibility to implement a lot of cool stuff, like maps from
leaflet and other applications. This is why the search for something different began.
There is the package
slidify from Ramnath Vaidyanathan and there is
R presentation, a feature of RStudio. They both function as a wrapper of several libraries which allows you to go from simple R Markdown to HTML presentations.
I decided to go with
During the first "experimentations" the look of the io2012 slides felt quite comfortable to me and so
R presentation was no option.
If this has changed in the meantime, please e-mail me with your experience or post something in the discussion.
It seems that
slidify is becoming a "thing" now, which is why I will restrict myself to show just the basics of the package and refer to some useful links.
But first have a look at an example by frederickf:
1. Install and Initialize
As stated out by Ramnath, the author of the package,
slidify is still under heavy development.
Therefore, we have to install it from github using the
After installing and loading slidify you can run:
The code between the two sets of three dashes is the YAML front matter (a recursive acronym that stands for "YAML Ain't Markup Language"), which is used to control the underlying layout and initialize the presentation.
The deck can be shared using GitHub, Dropbox or RPubs directly from R.
2. Author and Edit
As I pointed out, here just some basics on how to control
2.1 Add slide content
With three dashes we can separate slides. Content can be written in Markdown or plain HTML. R Code can be implemented like this:
- Markdown Basics:
2.1 Change the look and feel
To change the look and feel of your presentation the options framework, highlighter and hitheme must be changed. For each of them a variety of options are available:
- Highlighters and Hithemes:
A short summary of all of this is shown in Ramnaths video about
2.1 Collection of links
- Get Started
- Tutorial on the slide layout
- Tutorial on widgets in slidify
- Creating elegant HTML presentations that feature R code (using slidify)
- Fantastic presentations from R using slidify and rCharts
- Slidify: Modern, simple presentations written in R Markdown
3. Generate and Publish
To generate a static HTML file containing the presentation we can just use:
... and have a look with:
Github and Dropbox can be accessed with:
Printing to PDF is a challenge, but I have not checked all options yet (like pandoc for example) This is probably the only downside I came across with during the making of my first HTML presentation.
Overall, the combination of Markdown and
slidify can create a nice set of slides in a short amount of time.
The coding with
slidify is very straightforward and feels fresh after using
Beamer for a long time.
If you use R frequently,
slidify helps by bringing together reproducible analysis and a nice presentation of your results.