playGetIDs: Get or set IDs of selected points

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Part of the playwith Application Programming Interface.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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.

Details

Not yet.

Value

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

Author(s)

Felix Andrews felix@nfrac.org

See Also

playwith.API

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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()

}

11010tianyi/playwith documentation built on May 5, 2019, 10:37 a.m.