rxProgress: RxODE progress bar functions

View source: R/progress.R

rxProgressR Documentation

RxODE progress bar functions

Description

rxProgress sets up the progress bar

Usage

rxProgress(num, core = 0L)

rxTick()

rxProgressStop(clear = TRUE)

rxProgressAbort(error = "Aborted calculation")

Arguments

num

Tot number of operations to track

core

Number of cores to show. If below 1, don't show number of cores

clear

Boolean telling if you should clear the progress bar after completion (as if it wasn't displayed). By default this is TRUE

error

With rxProgressAbort this is the error that is displayed

Details

rxTick is a progress bar tick

rxProgressStop stop progress bar

rxProgressAbort shows an abort if rxProgressStop wasn't called.

Value

All return NULL invisibly.

Author(s)

Matthew L. Fidler

Examples

f <- function() {
  on.exit({
    rxProgressAbort()
  })
  rxProgress(100)
  for (i in 1:100) {
    rxTick()
    Sys.sleep(1 / 100)
  }
  rxProgressStop()
}

f()



RxODE documentation built on March 23, 2022, 9:06 a.m.