The Completely raw data can we see detail in Table 1
M <- gvisMotionChart(Fruits, "Fruit", "Year", options = list(width = 400, height = 350))
plot(M)
mark_func <- function(d) {
d$Mean = mean(d$Popularity)
CC <- gvisComboChart(d, xvar = "City", yvar = c("Mean", "Popularity"), options = list(seriesType = "bars",
width = 450, height = 300, title = "City Popularity", series = "{0: {type:\"line\"}}"))
return(CC)
}
plt <- mark_func(CityPopularity)
plot(plt)
M <- gvisMotionChart(Fruits, "Fruit", "Year", options = list(width = 400, height = 350))
plot(M)
print(M, "chart") ## doesn't work
M
suppressPackageStartupMessages(library(googleVis))
library("googleVis") ## where Fruits are stored
summary(Fruits) ## display screwed up by 'asis'
Fruit Year Location Sales Expenses
Apples :3 Min. :2008 East:6 Min. : 81.00 Min. :71.00
Bananas:3 1st Qu.:2008 West:3 1st Qu.: 89.00 1st Qu.:76.00
Oranges:3 Median :2009 Median : 94.00 Median :78.00
Mean :2009 Mean : 93.89 Mean :78.89
3rd Qu.:2010 3rd Qu.: 98.00 3rd Qu.:80.00
Max. :2010 Max. :111.00 Max. :91.00
Profit Date
Min. : 7 Min. :2008-12-31
1st Qu.:10 1st Qu.:2008-12-31
Median :13 Median :2009-12-31
Mean :15 Mean :2009-12-31
3rd Qu.:16 3rd Qu.:2010-12-31
Max. :32 Max. :2010-12-31
plot(gvisMotionChart(data = Fruits, "Fruit", "Year", options = list(width = 600,
height = 400)))
M <- gvisMotionChart(Fruits, idvar = "Fruit", timevar = "Year")
plot(M) ## doesn't work
print(M, "chart") ## doesn't work
M ## works