control_slider_Y: A vertical slider to modify the range of a continuous...

Description Arguments Value Usage See Also Examples

View source: R/control_slider_Y.R

Description

The control_slider_Y widget displays a vertical slider to drag and select a new numeric value of a simulation variable.

Arguments

inject

String of the variable name to be modified/injected by the switch widget. For example, inject = "i". The variable should be in boolean form (e.g., 0 or 1, FALSE or TRUE).

minimum

The minimum value of inject.

maximum

The maximum value of inject.

label

A small caption/label for the widget.

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

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

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 

     varToSlide <- 0
     for (i in 1:500) {
       switchboard(delay = 0.01) %>%
         control_slider_Y("varToSlide", label = "0 to 100") %>%
         number(varToSlide)
     }
     switchboard_close()


## End(Not run)

switchboard documentation built on Oct. 9, 2021, 1:06 a.m.