[.ggobi {Rggobi}R Documentation

Obtains a reference to a ggobi dataset

Description

This is a convenient syntax for referring to one or more datasets within a ggobi instance, either by index or by name. [ operator returns a list of one or more objects of class ggobiDataset, while [[ is used to access a single dataset. These ggobiDataset objects can be used to refer to the dataset in the ggobi instance and the preferred type for the .data argument in most functions in the GGobi package.

NOTE: This has changed in release 1.0.0 in order to be more consistent with list subsetting in R and it no longer returns the element if the index identifies only a single element.

Usage

"[.ggobi"(x, ..., drop = FALSE)
"[[.ggobi"(x, ..., drop = FALSE)

Arguments

x the object of class ggobi
... the identifiers for the datasets within the ggobi instance.
drop

Value

One or more objects of class ggobiDataset. These are opaque references to internal C structures and should not be operated on directly. Instead, one should use the functions and methods that operate on objects of this class.

Author(s)

Duncan Temple Lang

References

http://www.ggobi.org

See Also

names.ggobi names.ggobiDataset dim.ggobiDataset dimnames.ggobiDataset

Examples

  g <- ggobi(system.file("data", "flea.xml", package="Rggobi"), args="-noinit")
  g[[1]]

  names(g)
  g[["flea"]]

  dim(g[[1]])
  g$setData(system.file("data", "sat.xml", package="Rggobi"))
  g[[2]]
  g[["SAT scores"]]

[Package Rggobi version 1.1-3 Index]