pb_len | R Documentation |
Simple wrapper for progress_bar
for standard
and quickly ready progress bars; including messages, bar progression,
percentage and time elapsed, and ETA.
pb_len(.x, width = 76L, show_after = 2L, clear = FALSE)
tick(pb, what = "")
.x |
(int) total number of step to count |
width |
(int, default = 76) total console width used by the bar |
show_after |
(num, default = 2) minimum number of seconds needed for the process to display the progress bar |
clear |
(lgl, default = FALSE) if TRUE, at the end of the process the progress bar will be cleared |
pb |
an object of class |
what |
(chr, default = "") short prompt to see at the beginning of the progressbar |
a progress_bar
object
tick()
: wrapper function to update the progress bar
pb <- pb_len(100)
for (i in 1:100) {
Sys.sleep(0.1)
tick(pb, paste("i = ", i))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.