View source: R/loading-animations.R
progression_calculator | R Documentation |
Creates a progression calculator which can display a loading bar and expected time to completion
progression_calculator(task_description, N) ## S3 method for class 'progression_calculator' render(object, i, interval = 10, ...)
task_description |
A description of the task which is executed, if set to NA then no description if printed when using the render() function |
N |
The number of steps that are needed to complete the task |
object |
A progression calculator |
i |
The current iteration. |
interval |
The number of iterations to be completed before the progression calculator is updated. |
... |
further arguments passed to or from other methods. |
## Not run: #create progression calculator with 10 iterations progress = progression_calculator("Example", N=10) for(i in 1:10) { render(progress, i, interval=1) #render the calculator Sys.sleep(0.2) } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.