I have tried to build a presentation with slidify package in R. I have coded the presentation and called slidify function on the following .Rmd
file. I have used the diamonds dataset in GGally
.
When I published the following , n1$show("iframesrc", cdn = TRUE)
is not displaying the rChart.
Error in object$show(): object 'opts_current' not found
gvisMotionChart
is also showing errors.
I was wondering and expecting rCharts
and gvisMotionChart
, I am missing something. Thanks in anticipation.
---
title : Presentation
subtitle :
author :
job :
framework : io2012 # {io2012, html5slides, shower, dzslides, ...}
highlighter : highlight.js # {highlight.js, prettify, highlight}
hitheme : tomorrow #
widgets : [mathjax, quiz, bootstrap,shiny,interactive] # {mathjax, quiz, bootstrap}
mode : selfcontained # {standalone, draft}
knit : slidify::knit2slides
--- &interactive
```{r}
library(rCharts)
library(ggplot2)
library(GGally)
n1 <- nPlot(carat ~ cut , group = "color", data = diamonds[1:40,], type = "multiBarChart")
n1$show("iframesrc", cdn = TRUE)
```
--- &interactive
## Plot
```{r opts.label = 'interactive'}
library(googleVis)
library(GGally)
g <-gvisMotionChart(diamonds, "carat", "price", options = list(width = 800, height = 600))
g$show("iframesrc", cdn = TRUE)
```