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)
r1$show('iframesrc' ,cdn  = TRUE) 

Example 2:

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

#r1$show('iframesrc' ,cdn  = TRUE) 
r1$show('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$show('iframesrc' ,cdn  = TRUE) 
m1$show('inline', include_assets = TRUE)
Loading required package: reshape2

NVD3

Example 4:

hair_eye_male <- subset(as.data.frame(HairEyeColor), Sex == "Male")

n1 <- nPlot(Freq ~ Hair, group = "Eye", data = hair_eye_male, type = "multiBarChart")

n1$show('inline', include_assets = TRUE)