Description Arguments Value Usage See Also Examples
The injector_2D widget displays a bivariate window of data with two
sliderd that injects/modifies characteristics of the data. The plotted data
have a half-life and are deleted once their timer (parameter forget)
expires. For the univariate version use injector. The number of data
points in the window can be throttled with forget or delay.
Options also include automatic regression (plotRegression) and an the
sample size of the number of data points currently displayed (plotSampleSize).
eavesdrop |
A vector of two variables to track on a bivariate plot. For
example, |
minimum |
A vector of the two minimum values of variables in |
maximum |
A vector of the two maximum values of variables in |
inject |
A vector of the two strings for each variable name to be
modified/injected by widgets. For example, if |
label |
A vector of the two short strings designating labels/captions
for each of in |
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., |
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. Increase number for smoother progress bar animation. |
forget |
A time-delay in milliseconds 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., |
plotRegression |
Display a switchboard-estimated regression line on a widget. |
plotSampleSize |
Display the number items (N) displayed within a widget. |
switch |
Display an on/off switch on a widget that controls widget updates.
When |
Nothing.
1 2 3 4 |
Other eavesdroppers:
benchmark(),
counter_tally(),
counter(),
eavesdropper_2D(),
eavesdropper_X(),
eavesdropper(),
injector_X(),
injector(),
number_pair(),
number_quartet(),
number_trio(),
number(),
progress_benchmark()
Other injectors:
control_slider_Y_pair(),
control_slider_Y(),
control_slider_pair(),
control_slider(),
control_switch_pair(),
control_switch_trio(),
control_switch(),
injector_X(),
injector()
Other moving windows:
eavesdropper_2D(),
eavesdropper_X(),
eavesdropper(),
injector_X(),
injector()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
populationMean = 0
populationSD = 1
for (i in 1:4000) {
randomNormal <- rnorm(1, populationMean, populationSD)
switchboard(delay = 0.01) %>%
injector_2D(c(populationSD, randomNormal),
inject = c("populationSD", "populationMean"),
minimum = c(0.1, - 5),
maximum = c(3.1, 5),
label = c("pop mean", "pop SD"),
forget = 2000)
}
switchboard_close()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.