Description Usage Arguments Value See Also Examples
This provides a reference class representing a text progress bar that displays the
estimated time remaining. When finished, it displays the total duration. The
automatic progress bar can be disabled by setting progress_location = NULL
.
1 2 | progress_estimated(n, min_time = 0,
progress_location = make_kpb_output_decisions())
|
n |
Total number of items |
min_time |
Progress bar will wait until at least |
progress_location |
where to write the progress to. Default is to make
decisions based on location type using |
A ref class with methods tick()
, print()
,
pause()
, and stop()
.
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 27 28 | 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()
# output to stderr
p <- progress_estimated(10, progress_location = stderr())
# output to a file
p <- progress_estimated(10, progress_location = tempfile(fileext = ".log"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.