msgProgressBar-class: Message progress bar

Description Fields Methods Examples

Description

A simple progress bar to use in R packages where messages are prefered to console output.

Fields

iter

Total number of iterations

i

Current iteration

width

Width of the R console

width_bar

Width of the progress bar

progress

The number of character printed (continous)

progress_step

Addition to progress per iteration

Methods

increment()

Increment the message bar iterator.

initialize(iter)

Initialize a messagebar object

Examples

1
2
3
4
5
6
7
8
test_bar <- function(i = 10){
 bar <- msgProgressBar(i)
 for(j in 1:i){
   bar$increment()
   Sys.sleep(4/i)
   }
 }
 test_bar(100)

MansMeg/msgProgressBar documentation built on May 7, 2019, 2:45 p.m.