addXMLDataset {Rggobi} | R Documentation |
This writes a dataset in the XML format used by GGobi
addXMLDataset(data, name, dom, description = NULL, asElements = TRUE)
data |
the dataset to be serialized. |
name |
the name to use for the name attribute for the dataset |
dom |
the output object to which to write the XML. This is
usually an object of class XMLOutputStream . |
description |
an optional string or XML node giving a human-readable description of the dataset. |
asElements |
a logical value indicating whether the individual
values should be output within <el> </el> nodes or, if FALSE ,
simply as space-separated numbers/values. |
See writeDataXML
.
Duncan Temple Lang
if(require(XML)) { data(mtcars) dd <- xmlOutputBuffer() dd$addTag("ggobidata", close = FALSE) addXMLDataset(mtcars, "mtcars", dd, "The mtcars data taken from R") dd$closeTag() cat(dd$value()) }