I'm currently trying to replicate several different types of rCharts using my own data. The first is a HighCharts graph with the following code:
````{r} setwd("C:/Users/ypetscher/Dropbox/R fun") blah<-read.csv("g8a.csv")` require(slidify) require(rCharts) require(rHighcharts) ``` ```{r} x<-data.frame(blah,stringsAsFactors=TRUE) colnames(x)<-substr(colnames(x),2,5) a<-rHighcharts:::Chart$new() a$chart(type="column") a$title(text="Percent of Students on Grade Level on G8 FCAT for Reading (1), Math (2), Writing (3), and Science (4)") a$xAxis(categories=rownames(x)) a$yAxis(title=list(text="Percent Proficient")) a$data(x) ```
When it starts as a piece, the graph turns out beautifully, but when I use Knit HTML in the markdown method, it remains at the preview stage for some time, and when I finish it, it gives the message โstatus 15โ, which I donโt understand what it is means and how it should be allowed.
The second chart I'm trying to make is the Morris.js chart in Markdown with knitr. I took my R code and put it in R Markdown, which looks like this:
```{r} library(slidify) library(knitr) library(rCharts) library(RColorBrewer) library(reshape2) setwd("C:/Users/ypetscher/Dropbox/R fun") blah<-read.csv("g8.csv") blah ``` ```{r} m2<-mPlot(x="year",y=colnames(blah)[-1],data=blah, type="Bar") m2$set(barColors=brewer.pal(4,"Spectral")) m2$set(xlab="Year") m2$set(postUnits="%") m2$set(hideHover="auto") m2 ```
When I run the pieces, it creates a good graph as I expected with an html file (file: /// C: /Users/ypetscher/AppData/Local/Temp/RtmpW4q3ka/filed284f137718.html); however, when I click on Knit HTML, I get a file that contains code but does not create a graph. In addition, when Google Chrome appears, I get an error:
"The webpage was not found for the web address: File: /// C: /Users/YPETSC~1/AppData/Local/Temp/Rtmpk1Pfbp/filee0c383670e0.html Error 6 (net :: ERR_FILE_NOT_FOUND): The file or directory could not be found. "
Any help would be greatly appreciated in diagnosing these problems. Thank you very much!