progress | R Documentation |
Create a progress bar to be used with for loops that can possibly take a lot of time.
progress_bar(iter, total, start, message = NULL, width = 20)
format_hms(seconds)
iter |
integer. The current iteration step of the for loop. |
total |
integer. The total number of iterations. |
start |
POSIXct. The start time, as returned by |
message |
character. A message appearing before the progress bar. |
width |
integer. The length of the progress bar. |
seconds |
integer. Seconds to be converted into hh:mm:ss format. |
format_hms()
returns a character in the hh:mm:ss format. progress_bar()
prints the progress bar on the console, calling cat()
, therefore as returns
an invisible NULL
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.