R/combine_results.R

Defines functions combine_results

combine_results <- function(iterator, verbose = TRUE) {
  if (verbose) {
    # Create a progress bar to help track the runs
    pb <- txtProgressBar(min = 1, max = iterator - 1, style = 3)
    count <- 0
    function(...) {
      count <<- count + length(list(...)) - 1
      setTxtProgressBar(pb, count)
      flush.console()
      as.data.frame(rbind(...))
    }
  } else {
    # Just row bind the items
    function(...) {
      as.data.frame(rbind(...))
    }
  }
}

Try the imabc package in your browser

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

imabc documentation built on April 12, 2021, 9:06 a.m.