Track progress while evaluating an R expression. This is a wrapper around
progressr::with_progress(). progressr is useful because it handles
progress reporting in parallel contexts. However, it is worth noting that
Giotto does not adhere to progressr's guideline that with_progress()
should not be used within packages.
The default behavior of displaying progress is more convenient for end
users of packages with many functions. This implementation may shift over
time.
Arguments
- expr
An R expression to evaluate.
- handlers
A progression handler or a list of them. If NULL or an empty list, progress updates are ignored.
- cleanup
If TRUE, all progression handlers will be shutdown at the end regardless of whether the progression is complete or not.
- delay_terminal
If TRUE, output and conditions that may end up in the terminal will be delayed.
- delay_stdout
If TRUE, standard output is captured and relayed at the end just before any captured conditions are relayed.
- delay_conditions
A character vector specifying base::condition classes to be captured and relayed at the end after any captured standard output is relayed.
- interrupts
Controls whether interrupts should be detected or not. If TRUE and an interrupt is signaled, progress handlers are asked to report on the current amount of progress when the evaluation was terminated by the interrupt, e.g. when a user pressed Ctrl-C in an interactive session, or a batch process was interrupted because it ran out of time. Note that it's optional for a progress handler to support this and only some do.
- interval
(numeric) The minimum time (in seconds) between successive progression updates from handlers.
- enable
(logical) If FALSE, then progress is not reported. The default is to report progress in interactive mode but not batch mode. See below for more details.
