progress: Progress Bar

progressR Documentation

Progress Bar

Description

Create a progress bar to be used with for loops that can possibly take a lot of time.

Usage

progress_bar(iter, total, start, message = NULL, width = 20)

format_hms(seconds)

Arguments

iter

integer. The current iteration step of the for loop.

total

integer. The total number of iterations.

start

POSIXct. The start time, as returned by Sys.time().

message

character. A message appearing before the progress bar.

width

integer. The length of the progress bar.

seconds

integer. Seconds to be converted into hh:mm:ss format.

Value

format_hms() returns a character in the hh:mm:ss format. progress_bar() prints the progress bar on the console, calling cat(), therefore as returns an invisible NULL.


joker documentation built on June 8, 2025, 12:12 p.m.