createGoogleComboChart: Create a Google Combo Chart

Description Usage Arguments Value Parameters validation See Also

Description

Creates a Combo Chart using the googleVis R package

Usage

1
2
3
createGoogleComboChart(table, targetVar, groupVar, timeVar, min = NA,
  max = NA, lineVar = NULL, operation = NULL, restrictions = NULL,
  alternatives = NULL, filename = NULL)

Arguments

table

A character. The name of the table from which the data should be retrieved

targetVar

A character. The name of the column with the vertical axis variable.

groupVar

A character. The name of the column with the variable by which targetVar should be grouped

timeVar

A character. The name of the column with the horizontal axis variable

min

A numeric value or a date string in the format 'yyyy-mm-dd'. Lower bound for the timeVar

max

A numeric value or a date string in the format 'yyyy-mm-dd'. Upper bound for the timeVar

lineVar

A character. The name of the column with the variable that should be used to draw a line according to an operation.

operation

A charater. The operation that should be used to draw the line. Please check the applyOperation documentation for more information.

restrictions

A n x 2 matrix. The n equality restrictions that make timeVar and groupVar values unique when combined.

alternatives

A n x 2 matrix. Alternative values of a column (joined by 'or' conditions in a SQL query). The first column must contain the names of the columns. The second, its values.

filename

A character. The name of the .html file where the chart should be printed. The extension (.html) is not needed.

Value

A character vector if the chart was successfully created, with the name of two files: the .html file where the chart was printed and the .csv file where the source data was saved. Otherwise, an error string returned by one of validation functions listed under the 'Parameters validation' section.

Parameters validation

The parameters are checked according to the rules estabilished in validation functions and in the following order:

  1. targetVar, groupVar, timeVar, min, max, restrictions: validateGoogleChartParameters

  2. lineVar: validateTargetVariables and validateConsistency.

  3. lineVar, operation, groupVar: If groupVar is NULL, lineVar must be also NULL. Besides, operation cannot be NULL when lineVar is not NULL.

See Also

gvisComboChart


talithafs/dzVis-Package documentation built on May 31, 2019, 2:54 a.m.