statusbar | R Documentation |
This functions prints the progess of a for
loop to the console.
statusbar(run, max.run, width = 20L, info = run, percent.max = width)
run |
the iterator of the |
max.run |
either an integer with the maximum number of loops if
|
width |
an integer that indicates how wide the progress bar is printed. |
info |
a string with additional information to be printed at
the end of the line. The default is |
percent.max |
is deprecated, use width instead. |
Has no return value, but prints the progress to the console.
Jakob Gepp
for (i in 1:200) {
Sys.sleep(0.01)
statusbar(run = i, max.run = 200, width = 60L)
}
for (i in letters[1:16]) {
Sys.sleep(0.1)
statusbar(run = i, max.run = letters[1:16], width = 60L)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.