gvisMerge merges two gvis-objects, either next or below each other into one gvis-object. The objects are arranged in a HTML table.
gvisMerge(x, y, horizontal =FALSE, tableOptions ="border=\"0\"", chartid)
Arguments
x: a gvis-object.
y: a gvis-object.
horizontal: boolean. Default FALSE. If FALSE the two gvis-objects are arranged below each other, otherwise next to each other.
tableOptions: a valid HTML table option string. Default "border=\"0\"".
chartid: character. If missing (default) a random chart id will be generated based on chart type and tempfile
Returns
gvisMerge returns list of class "gvis" and "list".
An object of class "gvis" is a list containing at least the following components: - type: Google visualisation type, here 'gvisMerge'
chartid: character id of the chart object. Unique chart ids are required to place several charts on the same page.
html: a list with the building blocks for a page
header: a character string of a html page header: <html>...<body>,
chart: a named character vector of the chart's building blocks:
- **`jsHeader`**: Opening `<script>` tag and reference to Google's JavaScript library.
- **`jsData`**: JavaScript function defining the input `data` as a JSON object.
- **`jsDrawChart`**: JavaScript function combing the data with the visualisation API and user options.
- **`jsDisplayChart`**: JavaScript function calling the handler to display the chart.
- **`jsFooter`**: End tag `</script>`.
- **`jsChart`**: Call of the `jsDisplayChart`
function.
- **`divChart`**: `<div>` container to embed the chart into the page.
caption: character string of a standard caption, including data name and chart id.
footer: character string of a html page footer: </body>...</html>, including the used R and googleVis version and link to Google's Terms of Use.