# Create a modern bar instance.
bar <- ModernBar$new()
# Specify the number of ticks to be performed.
total <- 100
# Create the progress bar.
bar$create(total = total, initial = 0)
# Use the progress bar.
for (i in 1:total) {
# Sleep a bit.
Sys.sleep(0.02)
# Update the progress bar.
bar$update(i)
}
# Terminate the progress bar.
bar$terminate()
Run the code above in your browser using DataLab