如何在reveal.js和Rmarkdown中使用优秀的htmlwidget(例如http://rstudio.github.io/leaflet/)?
这个mwe (不是reveal.js)工作:
---
title: "Maptest 1"
output: html_document
---
## Map
```{r, echo=FALSE}图书馆(单张)
M <- leaflet()
M <- addTiles(m)
M <- addMarkers(m,lng=174.768,lat=-36.852,popup=“R的出生地”)
我
但这一条不是:
---
title: "Maptest 2"
output: revealjs::revealjs_presentation
---
## Map
```{r, echo=FALSE}图书馆(单张)
M <- leaflet()
M <- addTiles(m)
M <- addMarkers(m,lng=174.768,lat=-36.852,popup=“R的出生地”)
我
我重用了htmlwidgets-webpage中的示例,而openal.js-template来自https://github.com/jjallaire/revealjs
发布于 2015-06-22 22:27:06
要使用reveal.js,您需要在标头中指定框架和扩展小部件。还要确保你有最新版本的slidify和htmlwidgets。
---
title : Titley Title Titler
subtitle : subtitileir
author : Author Authoria
job : Jobby job, CJJ
framework : revealjs # {io2012, html5slides, shower, dzslides, ...}
highlighter : highlight.js # {highlight.js, prettify, highlight}
hitheme : github #
widgets : [] # {mathjax, quiz, bootstrap}
mode : selfcontained # {standalone, draft}
knit : slidify::knit2slides
ext_widgets: {rCharts: "libraries/highcharts"}
revealjs:
theme: Simple
---
### Title-y Title Titler
Tu-title space title
\- Author Authorio
--- https://stackoverflow.com/questions/30835973
复制相似问题