| progress {prada} | R Documentation |
Show progress of a task in a tcltk window as percentage
progress(title="processing task...", message="") updateProgress(percentage, autoKill=FALSE) killProgress()
title |
The title of the tcltk window |
message |
A short test message to add to the window |
percentage |
An integer giving the percentage of completion |
autoKill |
Logical indicating whether to kill the display after 100 is reached |
Function progress creates the progress window and sets
up the necessary environment. updateProgress takes as argument
an integer value indicating the percentage of completion and updates
the display. The integer value that gets passed to
updateProgress will usually be generated by an iterator
(e.g. in a for loop). killProgress may be called explicitely to
kill the progress window. Alternatively one can set the argument
autoKill of updateProgress to TRUE to automatically
kill the window once a value of 100 is reached.
The functions are called for their side effects.
Florian Hahne
if(interactive()){
progress(message="This is a progress display...")
for(i in 1:50) {
zz = rnorm(1e5)
updateProgress(i*2, autoKill=TRUE)
}
}