register_global_progression_handler {progressr} | R Documentation |
Add or Remove a Global 'progression' Handler
Description
Add or Remove a Global 'progression' Handler
Usage
register_global_progression_handler(action = c("add", "remove", "query"))
Arguments
action |
(character string)
If |
Value
Returns TRUE if a handler is registered, otherwise FALSE.
If action = "query"
, the value is visible, otherwise invisible.
Requirements
This function requires R (>= 4.0.0) - the version in which global calling handlers where introduces.
Examples
handlers(global = TRUE)
## This renders progress updates for each of the three calls slow_sum()
for (ii in 1:3) {
xs <- seq_len(ii + 3)
message(sprintf("%d. slow_sum()", ii))
y <- slow_sum(xs, stdout = TRUE, message = TRUE)
print(y)
}
handlers(global = FALSE)
[Package progressr version 0.15.1 Index]