progress_update: Update a progress node

View source: R/progress.R

progress_updateR Documentation

Update a progress node

Description

Advances (or sets) the step counter of an active handle. Emits a throttled status = "update" sink event when a message sink is set, or redraws the console status line otherwise. No-op on a closed handle.

Usage

progress_update(handle, current = NULL, add = 1L, label = NULL, force = FALSE)

Arguments

handle

rtemis_progress handle from progress_begin().

current

Integer or NULL: Set the counter to this value. When NULL, the counter advances by add. Clamped to ⁠[0, total]⁠ for determinate handles.

add

Integer: Increment when current is NULL.

label

Character or NULL: Update the display label.

force

Logical: If TRUE, bypass the redraw/sink throttle (getOption("rtemis.progress_throttle", 0.1) seconds).

Value

The handle, invisibly.

Author(s)

EDG

See Also

Other progress: progress_begin(), progress_clear(), progress_end(), progress_lapply()

Examples

h <- progress_begin(3L, label = "Fitting", output_type = "plain")
progress_update(h)
progress_update(h, current = 3L)
progress_end(h)

rtemis.core documentation built on Sept. 20, 2026, 9:06 a.m.