getDatasetReference {Rggobi} | R Documentation |
It is convenient to be able to refer to and operate
on a ggobi dataset as if it were a regular S dataset.
This generic function allows one to get an object that represents a
particular dataset and for which many of the standard methods used to
manipulate data frames, etc. are defined. The object is of class
ggobiDataset
. One can derive such an object by index or name,
or from a ggobiDisplay
or its fuller form
ggobiDisplayDescription
.
getDatasetReference(which, ...) getDatasetReference.ggobi(which, .gobi=getDefaultGGobi()) getDatasetReference.ggobiDisplay(which) getDatasetReference.ggobiDisplayDescription(which) getDisplayDataset.ggobi(dpy, .gobi)
which |
an identifier for the particular dataset to be foused to match agains the names of the datasets, or altend within the ggobi instance. This can be a string which is used to match agains the names of the datasets, or alternatively an integer which is used to index into the list of the datasets in the ggobi instance. |
dpy |
an object of class ggobiDisplay or an integer
identifying the particular display in the ggobi instance's display list. |
... |
other arguments that allow one to resolve the dataset,
usually the .gobi argument. |
.gobi |
the ggobi instance in which to resolve the
datgetDatasetReference.ggobiDisplay(which)aset. This should be an object of class ggobi or an integer identifying
the instance in the list of all current ggobi instances. |
The result is an object of class ggobiDataset
and its contents are meaningless at the S language level.
They are used only in internal C routines to identify
the dataset.
Duncan Temple Lang
g <- ggobi(system.file("data", "flea.xml", package="Rggobi"), args="-noinit") g$setData(system.file("data", "sat.xml", package="Rggobi")) g[1] g["flea"] g["SAT scores"] # Get reference by index g$getDatasetReference(1) # by name g$getDatasetReference("flea") # get it from a ggobiDisplayDescription object d <- g$getDisplays(T)[[1]] getDatasetReference(d) # get it from a ggobiDisplay object d <- g$getDisplays()[[1]] getDatasetReference(d)