switchboard_engine: Widget engine to construct/update/layout piped items on...

Description Usage Arguments

View source: R/switchboard.R

Description

Widget engine to construct/update/layout piped items on switchboard

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
switchboard_engine(
  .switchboard,
  eavesdrop = c(NULL, NULL),
  inject = c("", ""),
  minimum = c(" ", " "),
  maximum = c(" ", " "),
  label = c(" ", " "),
  size = 1,
  placeOnGrid = c(NULL, NULL),
  extendRow = 1,
  updates = 1,
  digits = 5,
  forget = 400,
  delay = 0,
  plotRegression = FALSE,
  plotSampleSize = FALSE,
  plotMean = FALSE,
  switch = FALSE,
  honest = TRUE,
  closeAtMaximum = FALSE,
  fill = "horizontal",
  file = "",
  benchmark = NA,
  constructor,
  updater
)

Arguments

.switchboard

A parent switchboard window. It is defined when layout is piped to a switchboard with %>%. If layout is called without a parent switchboard(), it will create it's own internally. NOTE: switchboard manages this parameter and you should not modify it.

eavesdrop

The variable(s) to display or track within a widget.

inject

Variable names(s) as strings of variables to be modified by widgets.

minimum

The minimum value of eavesdrop.

maximum

The maximum value of eavesdrop.

label

The caption/label(s) of 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 layout() 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.

extendRow

Extends the width of a widget and not the height. Used to better organize text within caption widget.

updates

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

digits

The number of digits to display in a widget.

forget

A time-delay in millisecond for when displayed points on a widget will be deleted.

delay

Pause each update of the switchboard. Default has no delay, values are in seconds (e.g., delay = 0.01 results in 0.01 second delay with each iteration).

plotRegression

Display a switchboard-estimated regression line on a widget.

plotSampleSize

Display the number items (N) displayed within a widget.

plotMean

Display a switchboard-estimated mean and standard deviation whisker plot on a widget.

switch

Display an on/off switch on a widget that controls the updating of the widget. When TRUE it will add the switch in the off-state on the switchboard. The user must activate the switch to start the widget.

honest

When TRUE, it updates the widget by the true percentage. The default (FALSE) has a cosmetic modification to the percentage value that helps update it in a prettier way.

closeAtMaximum

Functions like switchboard_close by closing the switchboard window when the eavesdropped value equals maximum. NOTE: if a widget has closeAtMaximum = TRUE, then this widget MUST be placed at the end (i.e., last widget) of the pipe chain.

fill

The direction of how things are animated when displaying progression. The default is horizontal, which tracks progression from left to right, but vertical can also be used for progress to occur in a bottom to up animation.

file

A *.png filename with a transparent background that designates an image to be used as a progress-bar. The total image size should be 80 by 80 pixels, but for best integration into switchboard layout, the actual image must be 75 by 75 pixels placed at the bottom left of the 80 by 80 image. This will leave a 5 pixel whitespace at both the top and right side of the image.

benchmark

The numerical value that will trigger a visual benchmark on a widget.

constructor

A widget-specific function that contains the Tcl/Tk script to build the widget.

updater

A widget-specific function that contains the Tcl/Tk script to update the constructed widget.


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