powered by
A progression handler for progress::progress_bar().
progress::progress_bar()
handler_progress( format = ":spin [:bar] :percent :message", show_after = 0, intrusiveness = getOption("progressr.intrusiveness.terminal", 1), target = "terminal", ... )
(character string) The format of the progress bar.
(numeric) Number of seconds to wait before displaying the progress bar.
(numeric) A non-negative scalar on how intrusive (disruptive) the reporter to the user.
(character vector) Specifies where progression updates are rendered.
Additional arguments passed to make_progression_handler().
make_progression_handler()
This progression handler requires the progress package.
Below are a few examples on how to use and customize this progress handler. In all cases, we use handlers(global = TRUE).
handlers(global = TRUE)
handlers("progress") y <- slow_sum(1:25)
handlers(handler_progress(complete = "#")) y <- slow_sum(1:25)
handlers(handler_progress(format = ":spin [:bar] :percent :message")) y <- slow_sum(1:25)
handlers(handler_progress(format = ":percent [:bar] :eta :message")) y <- slow_sum(1:25)
if (requireNamespace("progress", quietly = TRUE)) { handlers(handler_progress(format = ":spin [:bar] :percent :message")) with_progress({ y <- slow_sum(1:10) }) print(y) }
Run the code above in your browser using DataLab