Bar | R Documentation |
This is an abstract class that defines the pure virtual methods a concrete bar must implement.
This class cannot be instantiated. It needs to be extended by concrete
subclasses that implement the pure virtual methods. Instances of concrete
backend implementations can be conveniently obtained using the
BarFactory
class.
engine
The bar engine.
new()
Create a new Bar
object.
Bar$new()
Instantiating this class will throw an error.
create()
Create a progress bar.
Bar$create(total, initial, ...)
total
The total number of times the progress bar should tick.
initial
The starting point of the progress bar.
...
Additional arguments for the bar creation. See the Details section for more information.
The optional ...
named arguments depend on the specific concrete
implementation (i.e., BasicBar
or
ModernBar
).
This method returns void. The resulting bar is stored in the private
field .bar
, accessible via the active binding engine
.
update()
Update the progress bar.
Bar$update(current)
current
The position the progress bar should be at (e.g., 30 out of 100), usually the index in a loop.
terminate()
Terminate the progress bar.
Bar$terminate()
clone()
The objects of this class are cloneable with this method.
Bar$clone(deep = FALSE)
deep
Whether to make a deep clone.
BasicBar
, ModernBar
, and BarFactory
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.