Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


hgutils (version 0.2.11)

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
# 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)
}
# }

Run the code above in your browser using DataLab