Description Arguments Value Usage See Also Examples
View source: R/control_switch_trio_R.R
The control_switch_trio
widget displays three switches to toggle the state
(e.g., on or off, TRUE
or FALSE
) of three simulation variables.
A switch is blue when "on", and gray when "off".
inject |
A vector of the three strings for each variable name to be
modified/injected by the switch widget. For example,
|
label |
A vector of three short strings designating labels/captions for each switch. |
size |
A number used to designate the size (magnification) of the
widget. The default is set to |
placeOnGrid |
A row by column coordinate (e.g., |
Nothing.
1 2 |
Other injectors:
control_slider_Y_pair()
,
control_slider_Y()
,
control_slider_pair()
,
control_slider()
,
control_switch_pair()
,
control_switch()
,
injector_2D()
,
injector_X()
,
injector()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
varToSlideA <- 0
varToSlideB <- 0
varToSlideC <- 1
for (i in 1:500) {
switchboard(delay = 0.01) %>%
control_switch_trio(inject = c("varToSlideA", "varToSlideB", "varToSlideC"),
label = c("0 to 1", "0 to 1", "1 to 0")) %>%
number_trio(c(varToSlideA, varToSlideB, varToSlideC))
}
switchboard_close()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.