R/progress_bar.R

Defines functions progressBar

# progress bar
progressBar = function(iter, chain.len) {
  Perc = 100 * iter / chain.len
  if ( iter %% (chain.len/100) == 0 ) {
    cat("*", fill=FALSE)
    utils::flush.console()
    if ( iter %% (chain.len/10) == 0 ) {
      cat(":", Perc, "%", sep="", "\n")
      utils::flush.console()
    }
  }
}

Try the riAFTBART package in your browser

Any scripts or data that you put into this service are public.

riAFTBART documentation built on May 17, 2022, 1:07 a.m.