setDataFrame.ggobi {Rggobi} | R Documentation |
This sets the variables being displayed by the ggobi instance to the columns in the specified data frame, using all its rows as records. This allows one to create data dynamically in R and not write it to a file to have ggobi display it.
setDataFrame.ggobi(data, name= description, description = deparse(sys.call()[[2]]), add=TRUE, id = rownames(data), .data = NULL, .gobi=getDefaultGGobi())
data |
the data frame (rectangular ``table'' of values) to use in the ggobi displays. The values are converted to real/numeric values and can now contain NAs which are `missing' in GGobi. |
name |
the name by which to refer to this dataset and identify it in the variable panel by tab name. |
description |
a description of the data for use in window titles and |
add |
a logical value indicating whether to append this newly loaded dataset
to the existing collection (TRUE ), or to replace that collection with this
one dataset (FALSE ). |
id |
identifiers for the particular records to be set. By default, this applies to the first n observations. |
.data |
the GGobi dataset in which to insert the variables. This
is typically NULL . |
.gobi |
the ggobi instance whose data is to be replaced with those in the data frame. |
This discard all the existing plots and data sets in the ggobi instance and re-initializes it with the new data.
Since ggobi now supports multiple data sets within a ggobi instance, in the near future, we will provide an option to add this data frame as a data source in the ggobi instance.
Duncan Temple Lang
ggobi
setData.ggobi
setDataFile.ggobi
data(mtcars) g <- ggobi(mtcars) setDataFrame.ggobi(mtcars, .gobi = g) # Put a missing value in the dataset mtcars[1, 1] <- NA # Now load it g <- ggobi(mtcars) # Now retrieve the dataset and verify the # the NA is in the result from GGobi. g[[1]][,]