pb_len {depigner}R Documentation

Progress bar of given length

Description

Simple wrapper for progress_bar for standard and quickly ready progress bars; including messages, bar progression, percentage and time elapsed, and ETA.

Usage

pb_len(.x, width = 76L, show_after = 2L, clear = FALSE)

tick(pb, what = "")

Arguments

.x

(int) total number of step to count

width

(int, default = 76) total console width used by the bar

show_after

(num, default = 2) minimum number of seconds needed for the process to display the progress bar

clear

(lgl, default = FALSE) if TRUE, at the end of the process the progress bar will be cleared

pb

an object of class progress_bar

what

(chr, default = "") short prompt to see at the beginning of the progressbar

Value

a progress_bar object

Functions

Examples


  pb <- pb_len(100)
  for (i in 1:100) {
    Sys.sleep(0.1)
    tick(pb, paste("i = ", i))
  }


[Package depigner version 0.9.1 Index]