Present1

Charts

Lets display some charts.

library(rCharts)
library(ggplot2)

n1 <- nPlot(carat ~ cut , group = "color", data = diamonds[1:40,], type = "multiBarChart")

n1$print(include_assets=TRUE)

Plot

Plotting Chart from economics dataset

library(rCharts)
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 = 2, lineWidth = 2)
m1$print(include_assets=TRUE)

Plot

library(googleVis)
T <- gvisTable(Exports, options = list(width = 200, height = 280))
G <- gvisGeoChart(Exports, locationvar = "Country", colorvar = "Profit", 
    options = list(width = 360, height = 280, dataMode = "regions"))
TG <- gvisMerge(T, G, horizontal = TRUE, tableOptions = "bgcolor=\"#CCCCCC\" cellspacing=10")

print(TG, "chart")

Lets plot Fruit vs Year

library(googleVis)
M <- gvisMotionChart(Fruits, 'Fruit', 'Year', options=list(width=400, height=350))

print(M , 'chart')

Plot

library(XML)
library(googleVis)
Bubble <- gvisBubbleChart(Fruits, idvar="Fruit",  xvar="Sales", yvar="Expenses",colorvar="Year",
                          sizevar="Profit", options=list(hAxis='{minValue:75, maxValue:125}'))
print(Bubble, 'chart')

Plot Table

PopTable <- gvisTable(Population, options = list(width = 600, height = 300, 
    page = "enable"))

print(PopTable, "chart")