Learn R Programming

iplots (version 1.1-8)

iset.selected: Selection / linked highlighting

Description

These functions modify the selection or return the currently selected (highlighted) cases.

iset.selected returns a vector of IDs of all currently selected cases (in the current iSet)

iset.select changes the selection of the current iSet. All plots are updated immediately to reflect the new selection.

iset.sel.changed returns TRUE if the selection has changed since last call to this function.

iset.selectAll selects everything

iset.selectNone clears all selections (yes, not a good name)

Usage

iset.selected()
iset.select(what, mode="replace", mark=TRUE, batch=FALSE)
iset.sel.changed(iset=iset.cur())
iset.selectAll(batch=FALSE)
iset.selectNone(batch=FALSE)

Arguments

what

specification of the new selection. This can be either a vector of case IDs or a logical vector.

mode

mode to be used when combining the previous selection and teh surrent one. Supported modes are "replace", "union" and "intersect".

mark

mark to be used.

iset

iSet to query

batch

when set to TRUE dependents (e.g. plots) are not notified. This is useful for performing many complex updates at once without the need to re-draw all plots. Use with care as the system usually relies on event propagation.

Value

List of IDs of selected cases (iset.selected), boolean value (iset.sel.changed).

See Also

iset.list

Examples

Run this code
# NOT RUN {
data(iris)
attach(iris)
iplot(Sepal.Length,Petal.Length)
iset.select(Species=="virginica")
# }

Run the code above in your browser using DataLab