Learn R Programming

googleVis (version 0.5.10)

gvisMotionChart: Google Motion Chart with R googleChartName <- "motionchart" gvisChartName <- "gvisMotionChart"

Usage

gvisMotionChart(data, idvar = "id", timevar = "time", xvar = "",
  yvar = "", colorvar = "", sizevar = "", date.format = "%Y/%m/%d",
  options = list(), chartid)

Arguments

data
a data.frame. The data has to have at least four columns with subject name (idvar), time (timevar) and two columns of numeric values. Further columns, numeric and character/factor are optional. The combination of
idvar
column name of data with the subject to be analysed.
timevar
column name of data which shows the time dimension. The information has to be either numeric, of class Date or a character which follows the pattern 'YYYYWww' (e.g. '2010W04' for weekly data) or '
xvar
column name of a numerical vector in data to be plotted on the x-axis.
yvar
column name of a numerical vector in data to be plotted on the y-axis.
colorvar
column name of data that identifies bubbles in the same series. Use the same value to identify all bubbles that belong to the same series; bubbles in the same series will be assigned the same color. Series can be configured using the series o
sizevar
values in this column are mapped to actual pixel values using the sizeAxis option.
date.format
if timevar is of class Date then this argument specifies how the dates are reformatted to be used by JavaScript.
options
list of configuration options for Google Motion Chart. The options are documented in detail by Google online: [results=rd]{gsub("CHARTNAME", googleChartName, readLines(file.path(".", "inst", "mansections", "GoogleChartToolsURLConfigOptions.txt")))