writeDataXML {Rggobi} | R Documentation |
This creates an XML output object (to a buffer, DOM, ...) containing a description of a collection of datasets using GGobi's data format.
writeDataXML(..., dom = xmlOutputDOM("ggobidata", attrs = c(count = length(args))))
... |
one or more datasets, typically given as
name=object so that the `name' is used in the XML
description.
|
dom |
the XML output object to which to write/append the XML
description. This is usuall an object of class XMLOutputStream |
The GGobi data format is described in the GGobi documentation
and may be used in other projects and contexts.
It is reasonably simply, consisting of a top-level
ggobidata
node with an (optional) attribute indicating the
number of datasets it contains, and then each dataset described as
sub-nodes. Each dataset consists of a top-level data
node
with name
attribute. Within this, we have
an optional description
node giving a human-readable
description of the dataset, where it came from, etc.
Next is a variables
node which details each of the variables,
giving its type (currently either as a realvariable
or categoricalvariable
) and any other information, such
as its name and its levels.
The dom
object is returned, presumably with its state
changed to include the XML for the datasets.
Duncan Temple Lang
addXMLDataset
data(mtcars) dd <- writeXMLData(mtcars = mtcars) cat(dd$value())