luiscape / reliefweb

The ReliefWeb Package allows you to query ReliefWeb's API, download its output and prepare it for analysis.
4 stars 3 forks source link

Create a progress bar. #6

Closed luiscape closed 10 years ago

luiscape commented 10 years ago

Here is the code:

total <- 20
# create progress bar
pb <- txtProgressBar(min = 0, max = total, style = 3)
for(i in 1:total){
  Sys.sleep(0.1)
  # update progress bar
  setTxtProgressBar(pb, i)
}
close(pb)

from: http://ryouready.wordpress.com/2009/03/16/r-monitor-function-progress-with-a-progress-bar/