progress_estimated

0th

Percentile

Progress bar with estimated time.

This reference class represents a text progress bar displayed estimated time remaining. When finished, it displays the total duration.

Keywords
internal
Usage
progress_estimated(n, min_time = 0)
Arguments
n
Total number of
min_time
Progress bar will wait until at least min_time seconds have elapsed before displaying any results.
Value

A ref class with methods tick(), print(), pause(), and stop().

Aliases
  • progress_estimated
Examples
p <- progress_estimated(3)
p$tick()
p$tick()
p$tick()

p <- progress_estimated(3)
for (i in 1:3) p$pause(0.1)$tick()$print()

p <- progress_estimated(3)
p$tick()$print()$
 pause(1)$stop()

# If min_time is set, progress bar not shown until that many
# seconds have elapsed
p <- progress_estimated(3, min_time = 3)
for (i in 1:3) p$pause(0.1)$tick()$print()

## Not run: ------------------------------------
# p <- progress_estimated(10, min_time = 3)
# for (i in 1:10) p$pause(0.5)$tick()$print()
## ---------------------------------------------
Documentation reproduced from package dplyr, version 0.3, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.