How can I use the great htmlwidgets (for example http://rstudio.github.io/leaflet/) with reveal.js and Rmarkdown?
This mwe (not reveal.js) works:
---
title: "Maptest 1"
output: html_document
---
## Map
```{r, echo=FALSE}
library(leaflet)
m <- leaflet()
m <- addTiles(m)
m <- addMarkers(m, lng=174.768, lat=-36.852, popup="The birthplace of R")
m
```
But this one doesn't:
---
title: "Maptest 2"
output: revealjs::revealjs_presentation
---
## Map
```{r, echo=FALSE}
library(leaflet)
m <- leaflet()
m <- addTiles(m)
m <- addMarkers(m, lng=174.768, lat=-36.852, popup="The birthplace of R")
m
```
I re-used the example from the htmlwidgets-webpage, and the reveal.js-template is from https://github.com/jjallaire/revealjs
To use reveal.js you need to specify the framework and extension widgets in your header. Also make sure you have the newest version of slidify and htmlwidgets.