Last data update: 2014.03.03
|
R: Create a checkbox control
Create a checkbox control
Description
Create a checkbox control to enable manipulation of logical plot variables.
Usage
checkbox(initial = FALSE, label = NULL)
Arguments
initial |
Initial value for checkbox. Must be logical (defaults to FALSE ).
|
label |
Display label for checkbox. Defaults to the variable name if not specified.
|
Value
An object of class "manipulator.checkbox" which can be passed to the manipulate function.
See Also
manipulate , slider , picker , button
Examples
## Not run:
## Using checkboxes for boolean parameters
manipulate(
plot(cars, axes = axes, ann = label),
axes = checkbox(TRUE, "Draw Axes"),
label = checkbox(FALSE, "Draw Labels"))
## Toggle boxplot outlier display using checkbox
manipulate(
boxplot(Freq ~ Class, data = Titanic, outline = outline),
outline = checkbox(FALSE, "Show outliers"))
## End(Not run)
Results
|