progress {prada} | R Documentation

## A simple tcltk progress window

### Description

Show progress of a task in a tcltk window as percentage

### Usage

      progress(title="processing task...", message="")
      updateProgress(percentage, autoKill=FALSE)
      killProgress()

### Arguments

`title` | The title of the tcltk window
`message` | A short test message to add to the window
`percentage` | An integer giving the percentage of completion
`autoKill` | Logical indicating whether to kill the display after 100 is reached

### Details

Function `progress` creates the progress window and sets up the necessary environment. `updateProgress` takes as argument an integer value indicating the percentage of completion and updates the display. The integer value that gets passed to `updateProgress` will usually be generated by an iterator (e.g. in a for loop). `killProgress` may be called explicitely to kill the progress window. Alternatively one can set the argument autoKill of `updateProgress` to `TRUE` to automatically kill the window once a value of 100 is reached.

### Value

The functions are called for their side effects.

### Author(s)

Florian Hahne

### See Also

### Examples

    if(interactive()){
      progress(message="This is a progress display...")
      for(i in 1:50) {
         zz = rnorm(1e5)
         updateProgress(i*2, autoKill=TRUE)
      }
    }

[Package prada version 1.10.1 Index]