0

I am unable to get a desired HTML from running the code below. I attached the resulting "Output" file as a snapshot. The controls are empty and there is no plot. What am I doing wrong?

Thank you.

Rmarkdown code:

---
title: "Test"
output: html_document
---

```{r, echo=FALSE, results='asis', cache=FALSE}
#install.packages("devtools")
require(devtools)
install_github("ramnathv/rCharts")
install_github("yihui/knitr")

library(rCharts)
library(knitr)

n1 <- rPlot(mpg ~ wt, data = mtcars, color = "gear", type = "point")
n1$addControls("x", value = "wt", values = names(mtcars))
n1$addControls("y", value = "wt", values = names(mtcars))
n1$addControls("color", value = "gear", values = names(mtcars))

n1$show('iframesrc', cdn = TRUE)
```

My setup: Windows 7 Pro, 64 bit. RStudio version 0.99.892. Note to install devtools when running the code attached. I click on "Knit HTML" in RStudio to build.

Output

Roman Luštrik
  • 69,533
  • 24
  • 154
  • 197
SeanSH000
  • 11
  • 2
  • Does it open in the generated html? If not, this isn't necesarily an Rstudio issue. – Roman Luštrik Apr 07 '16 at 07:33
  • The plot does not open in the generated HTML. The snapshot above is taken from the generated HTML. You might be right in that it is not necessarily a RStudio issue :/ – SeanSH000 Apr 08 '16 at 20:46
  • Have you seen [this](http://stackoverflow.com/questions/33288134/how-do-you-publish-rcharts-with-knithtml)? – Roman Luštrik Apr 11 '16 at 07:12
  • Yes, I've seen that and I get an error: pandoc.exe: Could not fetch C:/Users/sean.salleh/Documents/R/win-library/3.2/rCharts/libraries/polycharts/js/polychart2.standalone.js InvalidUrlException "C:/Users/sean.salleh/Documents/R/win-library/3.2/rCharts/libraries/polycharts/js/polychart2.standalone.js" "Invalid scheme" Error: pandoc document conversion failed with error 67 – SeanSH000 Apr 12 '16 at 18:25

0 Answers0