Learn R Programming

rggobi (version 2.1.22)

"variables<-.GGobiDisplay": Set display variables

Description

Set display variables with a list of x, y, and z component variable indices.

Usage

# S3 method for GGobiDisplay
variables(x) <- value

Arguments

x

GGobiDisplay object

value

list with X, Y and Z components listing the variable indices to display, either as numeric position or character variable name

Details

There are three types of variables in GGobi displays: x, y, z, which correspond to the labels on the toggle buttons in GGobi. Most plots have a constrained set of possible options. For example, in tours you can only set x variables, and you must have at least three. Or in the rotation plot, you need exactly one x, y, and z variable.

Currently, there is no checking done to ensure that you are sending a sensible set of variables for the given display type. Generally, any invalid choices will be silently ignored.

Examples

Run this code
# NOT RUN {
if (interactive()) {
g <- ggobi(mtcars)
d <- display(g[1], "Parallel Coordinates Display")
variables(d)
variables(d) <- list(X=1:8)
variables(d) <- list(X=c("mpg", "cyl"))
variables(d)}
# }

Run the code above in your browser using DataLab