progress_phyllotaxis: Display an organic-like geometric spiral pattern as a...

Description Arguments Value Usage See Also Examples

View source: R/progress_phyllotaxis.R

Description

The progress_phyllotaxis widget displays the growth of geometric spiral pattern as a progress bar. You know, like the way aloe plants grow.

Arguments

eavesdrop

The variable to track with a progress bar.

maximum

The maximum value of eavesdrop that marks the end of what to progress/track.

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.

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.

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).

honest

When TRUE, it updates the widget by the true progression value. The default (FALSE) has a cosmetic modification to the progression 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.

Value

Nothing.

Usage

1
2
3
progress_phyllotaxis(eavesdrop, maximum = 100, caption = "",
   size = 1, placeOnGrid = c(1, 1), updates = 100, delay = 0, honest = FALSE,
   closeAtMaximum = FALSE)

See Also

Other progress bars: progress_benchmark(), progress_ibis(), progress_image(), progress_oyster(), progress_percent(), progress_pikachu(), progress_ring_percent(), progress_ring()

Examples

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


## End(Not run)

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