Save plot as image in rCharts

384 views Asked by At

Question is pretty self-explanatory - how do I save my rCharts plots as a non-interactive image file?

I'm using it with OpenCPU, so any help there would also be great!

Cheers.

1

There are 1 answers

0
Claudia On

rCharts creates an iFrame so it can only be viewed in a browser (because it's basically html). I had a similar problem. I wanted a pdf that contained a bunch of rCharts, so I wrote some R code that creates an html page and sticks the rCharts into the appropriate locations (dealing with spacing, extra text and headers, styling, etc). Then it's easy to turn the html into a pdf.