## Please note that by default the plot (better plot.gvis) command
## will open a browser window and requires Flash and Internet
## connection to display the visualisation.
Fruits
## timevar Year
M1 <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Year")
str(M1)
## print.gvis, will concatenate the list into a one long string
M1
plot(M1)
## Usage of date variable
M2 <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Date",
date.format = "/plot(M2)
## Options: no side panel on the right
M3 <- gvisMotionChart(Fruits,"Fruit","Year",
options=list(showSidePanel=FALSE))
plot(M3)
## Options: trails un-ticked
M4 <- gvisMotionChart(Fruits, "Fruit", "Year",
options=list(state='{\"showTrails\":false};'))
plot(M4)Run the code above in your browser using DataLab