Interactive HTML presentation with R, googleVis, knitr, pandoc and slidy
Tonight I will give a talk at the Cambridge R user group about googleVis. Following my good experience with knitr and RStudio to create interactive reports, I thought that I should try to create the slides in the same way as well.
Christopher Gandrud's recent post reminded me of deck.js, a JavaScript library for interactive html slides, which I have used in the past, but as Christopher experienced, it is currently not that straightforward to use with R and knitr
.
Thus, I decided to try slidy in combination with knitr and pandoc. And it worked nicely.
I used RStudio again to edit my Rmd-file and knitr
to generate the Markdown md-file output. Following this I run pandoc
on the command line to convert the md-file into a single slidy
html-file:
Et volià, here is the result:pandoc -s -S -i -t slidy --mathjax Cambridge_R_googleVis_with_knitr_and_RStudio_May_2012.md -o Cambridge_R_googleVis_with_knitr_and_RStudio_May_2012.html
4 comments :
Hi, I had problems using knitr and googlevis, the problem is that when I try to include a presentation motionchart knitr a blank frame appears and nothing else, try printing it (print (m1, 'chart')) and directly putting html code with no luck. the graph is running in (http://thinkstats.blogspot.com/). Could you please help me. Try gvisMotionChart examples with no luck, neither included when multiple graphs are presented, and the gvisMotionChart not appear.
Use R versions 2.15 and 3.0 at 64 bits and the latest of knitr and googleVis. If you want I can send you the data.
Hi Daniel,
By default Flash charts are not visible when opened from a local directory. Please see the Warnings section of the gvisMotionChart help file, or the section "Displaying gvis objects locally" of the googleVis package vignette (http://cran.r-project.org/web/packages/googleVis/vignettes/googleVis.pdf) for more details.
I hope this helps.
Markus
thank you! I use your sample presentation, putting the chart on a direct link dropbox and ready.
Thank you again. :).
I'm using Window 7, R 3.0.1 and RStudio 0.97.
I think the same problem that Daniel had but I don't understand very well how to deal with.
Daniel, do you only put the chart on a direct link dropbox and ready?
Post a Comment