playwith (version 0.9-54)

playGetIDs: Get or set IDs of selected points

Description

Part of the playwith Application Programming Interface.

Usage

playGetIDs(playState = playDevCur(), type = c("labelled", "brushed"), labels = FALSE)
playSetIDs(playState = playDevCur(), value, type = "brushed", space = "plot", add = FALSE, redraw = NA, pos = 1)
playClear(playState = playDevCur(), type = c("annotations", "labelled", "brushed"), redraw = TRUE)

Arguments

playState
a playState object representing the plot, window and device.
type
which type of points to get or set subscripts for.
labels
TRUE to return the labels as displayed; otherwise the subscripts into the original data object.
value
specifies the set of points to be selected. Can be an integer vector of subscripts, or a logical vector (not recycled).
space
the space to draw labels in if type = "ids".
add
if TRUE, add to any existing set of points; otherwise replace them.
redraw
whether to redraw the plot. The default NA only redraws if necessary (i.e. if an existing selection was replaced). If FALSE nothing is drawn.
pos
position specifier for labels.

Value

playGetIDs returns an integer vector, or if labels = TRUE a character vector.

Details

Not yet.

See Also

playwith.API

Examples

Run this code
if (interactive()) {

playwith(xyplot(1:100 ~ 1:100 | 1:2, subscripts = TRUE),
    labels = paste("label", 1:100, sep=""))
playSetIDs(value = c(50:60, 100))
playGetIDs()
playSetIDs(value = c(10, 20, 30), type = "labelled",
    space = "packet 1")
playGetIDs(labels = TRUE)
playClear()
playGetIDs()

}

Run the code above in your browser using DataLab