Learn R Programming

RSurvey (version 0.8-3)

ProgressBar: Progress Bar

Description

A progress bar that shows the status of long-running operations.

Usage

ProgressBar(win.title = "Progress Bar", label = "", maximum = 100, nsteps = NULL, min.nsteps = 10L, parent = NULL)
SetProgressBar(pb, value, label = NULL, step = NULL)

Arguments

win.title
character; a string to display as the title of the dialog box.
label
character; a string to display in the dialog box.
maximum
numeric; the maximum value for the progress bar. The minimum value is 0.
nsteps
numeric; the total number of increments the progress bar will make.
min.nsteps
numeric; the minimum number of increments. If greater than nsteps, the dialog box is not opened.
parent
tkwin; the GUI parent window.
pb
ProgressBar; an object returned from ProgressBar (see ‘Value’).
value
numeric; the value for the progress bar, between 0 and maximum.
step
numeric; the number of progress bar increments. If equal to nsteps, the dialog box will close.

Value

For ProgressBar an object of class "ProgressBar" and mode list is returned. Components of the list object include:
GetValue
function; returns the value of the progress bar.
MoveProgressBar
function; moves progress bar, passes a numeric argument.
SetLabel
function; sets label in the dialog box, passes a character argument.
DestroyWindow
function; closes the dialog box.
GetWindowState
function; returns FALSE if the dialog box has been closed, otherwise TRUE.
nsteps
numeric; see ‘Arguments’.
For SetProgressBar, the previous value of the progress bar. An error is returned if the progress has terminated prematurely.

References

This code was derived from the tkProgressBar function.