record_selector

0th

Percentile

Select a subset of data through a GUI to be brushed

We use a GUI created by qtbase to subset the data based on a given categorical variable. Specifically, we choose certain values of the variable (using the mouse or keyboard) and all the observations which have the same values on this variable will be brushed. This selector can link to any plots based on a mutaframe created by qdata.

Usage
record_selector(vars, data)
Arguments
vars
a character string or an integer as a column index, or a variable name (without quotes): the variable to be displayed in the data selector (if not specified, the first non-numeric variable will be used; if all columns are numeric, the first column will be used)
data
a mutaframe created by qdata
Details

The GUI supports multiple selections when we hold the Shift or Ctrl key. If the character string in the text input box matches with multiple items in the list, all of them will be selected.

When we select items in the list, usually a plot based on the same data will get brushed accordingly. On the other hand, when we click on a plot, the corresponding items in the list will be selected as well.

Value

NULL (a GUI will pop up)

See Also

qdata

Aliases
  • record_selector
Examples
library(cranvas)

## old iris as the toy example
qiris <- qdata(iris)
qparallel(~., data = qiris)
record_selector(Species, data = qiris)

## NRC rankings
qnrc <- qdata(nrcstat)
qparallel(10:13, data = qnrc, main = "Overview of Rankings", horizontal = FALSE)
record_selector(Institution, data = qnrc)
qparallel(14:19, data = qnrc, main = "Research, Student Support, Diversity")
qparallel(20:26, data = qnrc, main = "Publication, Award, Time to Degree")

cranvas_off()
Documentation reproduced from package cranvas, version 0.8.5, License: GPL

Community examples

Looks like there are no examples yet.