progressBarHook {RMassBank} | R Documentation

## Standard progress bar hook.

### Description

This function provides a standard implementation for the progress bar in RMassBank.

### Usage

    progressBarHook(object = NULL, value = 0, min = 0, max = 100, close = FALSE)

### Arguments

`object` | An identifier representing an instance of a progress bar.
`value` | The new value to assign to the progress indicator
`min` | The minimal value of the progress indicator
`max` | The maximal value of the progress indicator
`close` | If `TRUE`, the progress bar is closed.

### Details

RMassBank calls the progress bar function in the following three ways: `pb <- progressBarHook(object=NULL, value=0, min=0, max=LEN)` to create a new progress bar. `pb <- progressBarHook(object=pb, value= VAL)` to set the progress bar to a new value (between the set `min` and `max`) `progressBarHook(object=pb, close=TRUE)` to close the progress bar. (The actual calls are performed with `do.call`, e.g. `progressbar <- "progressBarHook" pb <- do.call(progressbar, list(object=pb, value= nProg))` . See the source code for details.)

To substitute the standard progress bar for an alternative implementation (e.g. for use in a GUI), the developer can write his own function which behaves in the same way as `progressBarHook`, i.e. takes the same parameters and can be called in the same way.

### Value

Returns a progress bar instance identifier (i.e. an identifier which can be used as `object` in subsequent calls.)

### Author(s)

Michele Stravs, Eawag <stravsmi@eawag.ch>

[Package RMassBank version 3.0.0 Index]