R/handler_pbmcapply.R
handler_pbmcapply.Rd
A progression handler for pbmcapply::progressBar()
.
(character) The symbols to form the progress bar for
utils::txtProgressBar()
.
(integer) The progress-bar substyle according to
pbmcapply::progressBar()
.
(character) The progress-bar style according to
(connection) A base::connection to where output should be sent.
(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()
.
This progression handler requires the pbmcapply package.
Below are a few examples on how to use and customize this progress handler.
In all cases, we use handlers(global = TRUE)
.
Since style = "txt"
corresponds to using handler_txtprogressbar()
with style = substyle
, the main usage of this handler is with
style = "ETA"
(default) for which substyle
is ignored.
if (requireNamespace("pbmcapply", quietly = TRUE)) {
handlers("pbmcapply")
with_progress({ y <- slow_sum(1:10) })
print(y)
}
#> M: Added value 1
#> M: Added value 2
#> M: Added value 3
#> M: Added value 4
#> M: Added value 5
#> M: Added value 6
#> M: Added value 7
#> M: Added value 8
#> M: Added value 9
#> M: Added value 10
#> [1] 55