I'm working with the R package slidify to create revealjs slides. I'd like to reveal code fragments incrementally using the RMarkdown (rather than edit the resulting HTML) but can't seem to figure out a way.
In the example below I have two code chunks and I'd like the second to occur only after the preceding paragraph. I can go in to the resulting HTML and add class=fragment
to the pre
tag, but this is very inefficient!
Suggestions
---
title : RevealJS with Bootstrap
framework : revealjs
---
```{r}
mean(1:3)
```
<div class="fragment">
This works fine, the div does not appear until you click forward in the deck. But you can't put the div tags around a code fragment.
</div>
```{r}
mean(1:3)
```