| Progress {biodb} | R Documentation |
A class for informing user about the progress of a process.
This class displays progress of a process to user, and sends notifications of this progress to observers too.
new()Initializer.
Progress$new(biodb = NULL, msg, total)
biodbA BiodbMain instance that will be used to notify observers of progress.
msgThe message to display to the user.
totalThe total number of elements to process.
Nothing.
increment()Increment progress.
Progress$increment()
Nothing.
clone()The objects of this class are cloneable with this method.
Progress$clone(deep = FALSE)
deepWhether to make a deep clone.
# Create an instance
prg <- biodb::Progress$new(msg='Processing data.', total=10)
# Processing
for (i in seq_len(10)) {
print("Doing something.")
prg$increment()
}