This is a demo of rCharts. Install rCharts using devtools::install_github('ramnathv/rCharts').

Before we begin charting, let us customize some settings for rCharts and knitr

library(rCharts)
library(plyr)
library(knitr)
library(reshape2)
library(scales)
options(RCHART_WIDTH = 600, RCHART_HEIGHT = 400)
knitr::opts_chunk$set(comment = NA, results = 'asis', tidy = F, message = F)

Time to get charting now!


Polychart

We will create our first chart using Polychart, a javascript charting library based on the grammar of graphics, and inspired by ggplot2.

Facetted Scatterplot

names(iris) = gsub("\\.", "", names(iris))
p1 = rPlot(SepalLength ~ SepalWidth | Species, data = iris, color = 'Species', type = 'point')
p1$print(include_assets=T)