Skip to content
ramnathv edited this page Apr 20, 2013 · 2 revisions

Publishing a visualization created using rCharts can be accomplished in one line using the publish method. It works by pushing your chart to a gist (so a github account is necessary) and using http://bl.ocks.org/ to view the chart. Here is an illustrative example.

require(rCharts)
p1 <- rPlot(mpg ~ wt | am, data = mtcars, type = 'point')
p1$show(static = T) # to see a static version of your plot
p1$publish(description = 'My First Plot', public = TRUE)

Currently, the page only displays the chart and the html. Future iterations of this method will display the R code used to create the chart and other visual piazzaz. So keep a watch!

UPDATE. The publish method has been expanded to include more hosts that you can publish your chart to. So try the following code to publish your chart to rPubs. Neat, right!!

p1$publish('My First rChart', host = 'rpubs')