Description Usage Arguments Value Objects from the Class Slots Extends Methods Author(s) See Also Examples
The DefaultProgressMonitor class represents an attempt to abstract
reporting of progress of a task. This class assumes that progress is reported
via a progressbar and provides means to get/set values for such a widget.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | DefaultProgressMonitor(label, value, minimum=0, maximum=100)
## S4 method for signature 'DefaultProgressMonitor'
elapsed(object)
## S4 method for signature 'DefaultProgressMonitor'
progressDone(object)
## S4 replacement method for signature 'DefaultProgressMonitor,logical'
progressDone(object) <- value
## S4 method for signature 'DefaultProgressMonitor'
progressError(object)
## S4 replacement method for signature 'DefaultProgressMonitor,logical'
progressError(object) <- value
## S4 method for signature 'DefaultProgressMonitor'
progressLabel(object)
## S4 replacement method for signature 'DefaultProgressMonitor,character'
progressLabel(object) <- value
## S4 method for signature 'DefaultProgressMonitor'
progressMaximum(object)
## S4 replacement method for signature 'DefaultProgressMonitor,numeric'
progressMaximum(object) <- value
## S4 method for signature 'DefaultProgressMonitor'
progressMinimum(object)
## S4 replacement method for signature 'DefaultProgressMonitor,numeric'
progressMinimum(object) <- value
## S4 method for signature 'DefaultProgressMonitor'
progressValue(object)
## S4 replacement method for signature 'DefaultProgressMonitor,numeric'
progressValue(object) <- value
|
label |
string specifying label for progressbar widget |
value |
integer value representing current progress towards task completion |
minimum |
integer value representing minimum range of progress |
maximum |
integer value representing minimum range of progress |
object |
object of (sub)class |
The DefaultProgressMonitor generator returns an object of class
DefaultProgressMonitor.
Although objects of the class can be created by a direct call to
new, the preferred method is to use the
DefaultProgressMonitor generator function.
done:logical scalar specifying if task completed.
Default is FALSE.
err:logical scalar specifying if an error has occurred.
Default is FALSE.
label:string specifying label for abstract progressbar
range:object of class BoundedRange
etime:object of class ElapsedTime
elapsed:object of class difftime specifying seconds
since last update
Class ProgressMonitor, directly.
signature(object = "DefaultProgressMonitor"):
Returns elapsed time since creation of abstract progressbar.
signature(object = "DefaultProgressMonitor"):
Returns TRUE if task is complete; otherwise, FALSE.
signature(object = "DefaultProgressMonitor", value = "logical"):
Sets value of the done slot.
signature(object = "DefaultProgressMonitor"):
Returns TRUE if an error occurred during processing; otherwise,
FALSE.
signature(object = "DefaultProgressMonitor", value = "logical"):
Sets value of the err slot.
signature(object = "DefaultProgressMonitor"):
Returns string representing label for abstract progressbar.
signature(object = "DefaultProgressMonitor", value = "character"):
Sets value of the label slot.
signature(object = "DefaultProgressMonitor"):
Returns integer representing maximum value for abstract progressbar.
signature(object = "DefaultProgressMonitor", value = "numeric"):
Sets the maximum value of the range slot.
signature(object = "DefaultProgressMonitor"):
Returns integer representing minimum value for abstract progressbar.
signature(object = "DefaultProgressMonitor", value = "numeric"):
Sets the minimum value of the range slot.
signature(object = "DefaultProgressMonitor"):
Returns integer representing current value for abstract progressbar.
signature(object = "DefaultProgressMonitor", value = "numeric"):
Sets the current value of the range slot.
P. Roebuck proebuck@mdanderson.org
difftime,
BoundedRange,
ElapsedTime,
ProgressMonitor
1 2 3 4 5 6 7 | showClass("DefaultProgressMonitor")
niters <- 10
dpm <- DefaultProgressMonitor("my task", value=0, maximum=niters)
for (i in seq.int(niters)) {
## Perform portion of task
progressValue(dpm) <- i # Modify current value
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.