Ioslides



  1. Ioslides Themes

Over the weekend, I decided to write up some slides for my stats section on Monday. Having really gotten into the grooveof using R Markdown, and having gotten a little rusty on using LaTeX with knitr, I decided to play around with HTML5slides instead of going the beamer route. In the spirit of results first, the finished presentation is shown below.Click inside the frame, then use your left and right arrows to navigate.

Ioslides

I was at first very interested in using reveal.js, as I really liked themulti-dimensional aspect of the presentation. I had a code chunk that demonstrated using stat_function() inggplot2, and included a hexidecimal color value. I wanted to have a brief aside where I could discuss hex colorswithout putting it right in the path of the rest of the rest of the presentation. I know this was a bit of a tangentfrom the main discussion, and it wasn’t super relevant, but I wanted to have the information in there anyway. In casesomeone asked about it (I tell myself).

Ioslides ioslides is also simple to use and looks better than Slidy out-of-the-box, but there are some potential compromises for this simplicity. Put bluntly, ioslides does more of the styling work for you at the cost of compatibility issues.

Ioslides

Slidy, ioslides, and Beamer are different technologies for creating HTML presentations with R Markdown. (:keywords 'org' 'nikola'))) (ox-ioslide. Avoid name clobbering without hiding symbols.'

Ioslides

Using the revealjs package, I created a new R Markdown file that would output as a reveal.js presentation. I lookedup the documentation onhow to do everything within RStudio, and got going.However, I quickly ran into a problem. When using RStudio, reveal.js only allows for vertical arrangement of slideswithin sections. That is to say, the presentation would be organized with columns of slides, each belonging to thesame section. The trouble is that section heading slides only contain the name of the section, and no furtherinformation. So it’s not possible, as far as I could figure out, to create a new slide below my ggplot2 slide thatwould talk about hexidecimal colors, as the slide on the “main” level could only show the section name, not the fullslide contents. Back to the drawing board.

Ioslides

I experimented with DZSlides and Slidy, butultimately decided on ioslides because it seemed thatRStudio had pretty good support and documentation for that format. For one, it doesn’t require using command line pandocin order to write into the slide format, which is very helpful. ioslides doesn’t feature two-dimensional presentation,and it’s not incredibly customizable, but it looks really good right out of the box.

The main customization I ended up using frequently is {.build}. Placed immediately after a new slide title, thiscommand prints each element of the slide separately, one after another. Using incremental: true in the YAML headerdoes this for ordered and unordered lists, but I wanted to make sure that my R code chunks would appear at the righttimes as well. Without {.build}, the slide would appear without text, but with the code chunks already printed.Unfortunately, I could not work out a way to declare the {.build} attribute for every slide. I tried puttingbuild: true in the YAML header (similar to using smaller: true in the header rather than {.smaller} for everyslide), but it didn’t work. So I have the attribute listed at the head of all slides that are not just showing plots(where it doesn’t really matter if things are loaded one at a time).

Beyond being mindful of what fits on one slide and the {.build} attribute, creating the ioslides presentation inRStudio was really not much different from creating any other R Markdown document. And, being HTML, it knitted muchfaster, enabling easier and quicker previewing of slides.

I’d say that the section went over well, and I certainly felt much more comfortable working through presentation slidesinstead of raw R script. It gave the section much more structure, and required me to spend more time thinking about thematerial we were going to cover and how best to present it. Hopefully that this post is useful for those consideringwriting presentation slides in RStudio.

Ioslides Themes

See also