number_pair: Display the value of two continuous variables in a...

Description Arguments Value Usage See Also Examples

View source: R/number_pair.R

Description

The number_pair widget displays the numerical value of two continuous variables.

Arguments

eavesdrop

A vector of two variables to track.

digits

The number of digits to display in a widget.

label

A vector of two small captions/labels for the widget.

updates

The number of times the widget is to be updated (e.g., when it be modified/changed). The default updates with each iteration.

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
number_pair(eavesdrop = c(NULL, NULL), digits = 5,
   updates = 1, label = c("", ""), size = 1, placeOnGrid = c(1, 1))

See Also

Other eavesdroppers: benchmark(), counter_tally(), counter(), eavesdropper_2D(), eavesdropper_X(), eavesdropper(), injector_2D(), injector_X(), injector(), number_quartet(), number_trio(), number(), progress_benchmark()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
     
     for (i in 1:250) {
       switchboard(delay = 0.01) %>%
         number_pair(c(i, i/2), label = c("i", "i/2"))
     }
     switchboard_close()


## End(Not run)

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