Learn R Programming

hgutils (version 0.2.19)

progression_calculator: Creates a progression calculator which can display a loading bar and expected time to completion

Description

Creates a progression calculator which can display a loading bar and expected time to completion

Usage

progression_calculator(task_description, N)

# S3 method for progression_calculator render(object, i, interval = 10, ...)

Arguments

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.

Examples

Run this code
if (FALSE) {
#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)
}
}

Run the code above in your browser using DataLab