Learn R Programming

progressr (version 0.5.0)

progressor: Create a Progressor Function that Signals Progress Updates

Description

Create a Progressor Function that Signals Progress Updates

Usage

progressor(
  steps = length(along),
  along = NULL,
  offset = 0L,
  scale = 1L,
  transform = function(steps) scale * steps + offset,
  label = NA_character_,
  initiate = TRUE,
  auto_finish = TRUE
)

Arguments

steps

(integer) Number of progressing steps.

along

(vector; alternative) Alternative that sets steps = length(along).

offset, scale

(integer; optional) scale and offset applying transform steps <- scale * steps + offset.

transform

(function; optional) A function that takes the effective number of steps as input and returns another finite and non-negative number of steps.

label

(character) A label.

initiate

(logical) If TRUE, the progressor will signal a progression 'initiate' condition when created.

auto_finish

(logical) If TRUE, then the progressor will signal a progression 'finish' condition as soon as the last step has been reached.

Value

A function of class progressor.