Skip to content

Instantly share code, notes, and snippets.

@ihrke
Created September 27, 2017 07:38
Show Gist options
  • Select an option

  • Save ihrke/5862771ff176046fa0ce418a785bfe7a to your computer and use it in GitHub Desktop.

Select an option

Save ihrke/5862771ff176046fa0ce418a785bfe7a to your computer and use it in GitHub Desktop.
one-line, fail-safe display of progressbar in for-loop
for(k in 1:nrep){
tryCatch(svMisc::progress(k, nrep, progress.bar = TRUE, init=(k==1)), error=function(x){})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment