Loading Libraries

library(knitr)
library(printr)
library(rCharts)

Polychart

Example 1:

r1 <- rPlot(mpg ~ wt, data = mtcars, type="point" , color="gear")
r1$print('iframesrc', include_assets=TRUE)

Example 2:

r1 <- rPlot(mpg ~ wt | am , data = mtcars, type="point" , color="gear")
r1$set(width = 800)
r1$print('inline', include_assets=TRUE)

Morris

Example 3:

data(economics, package = "ggplot2")
econ <- transform(economics, date = as.character(date))

m1 <- mPlot(x = "date", y = c("psavert", "uempmed"), type = "Line", data = econ)
m1$set(pointSize = 0, lineWidth = 1)


m1$print('inline', include_assets=TRUE, cdn = FALSE)
Loading required package: reshape2
m1$show('iframesrc', cdn  = TRUE)