if(interactive() && capabilities()["tcltk"]){
progress(message="This is a progress display...", sub="(step 1 of 50)")
for(i in 1:50) {
zz = rnorm(1e5)
updateProgress(i*2, autoKill=TRUE, sub=paste("(step", i, "of 50)"))
}
}
Run the code above in your browser using DataLab