control_slider_Y_pair {switchboard}R Documentation

A pair of vertical sliders to modify the range of two continuous simulation variables.

Description

The control_slider_Y_pair widget displays two vertical sliders to drag and select new numeric values of two simulation variable.

Arguments

inject

A vector of the two strings for each variable name to be modified/injected by the two sliders. For example, inject = c("A", "B").

minimum

A vector of the two minimum values for each variable in inject.

maximum

A vector of the two maximum values for each variable in inject.

label

A vector of the two small caption/labels for each slider.

size

A number used to designate the size (magnification) of the widget. The default is set to 1 which is 80 by 80 pixels. For example, setting to 3 will results in a widget 3-times the default size (240 by 240 pixels) and will occupy a grid area of 3 by 3.

placeOnGrid

A row by column coordinate (e.g., c(row-number, column-number)) of a grid that designates the position to draw the widget on the switchboard. Use showGrid() to help organize widget placement on dashboard. The default places the first widget in pipe chain to the c(1, 1) position, and all following on the same row stacked to the right.

Value

Nothing.

Usage

control_slider_Y_pair(inject = c("", ""), minimum = c(0, 0),
   maximum = c(100, 100), label = "", size = 1, placeOnGrid = c(1, 1))

See Also

Other injectors: control_slider_Y(), control_slider_pair(), control_slider(), control_switch_pair(), control_switch_trio(), control_switch(), injector_2D(), injector_X(), injector()

Examples

## Not run: 

     varToSlideA <- 0
     varToSlideB <- 50
     for (i in 1:500) {
       switchboard(delay = 0.01) %>%
         control_slider_pair_Y(inject = c("varToSlideA", "varToSlideB"),
                             label = c("0 to 100", "0 to 100")) %>%
         number_pair(c(varToSlideA, varToSlideB))
     }
     switchboard_close()


## End(Not run)


[Package switchboard version 0.1 Index]