record_selector: Select a subset of data through a GUI to be brushed

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

View source: R/GUI-selector.R

Description

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

1

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)

Author(s)

Yihui Xie and Jason Crowley

See Also

qdata

Examples

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

ggobi/cranvas documentation built on May 17, 2019, 3:10 a.m.