View source: R/progress_utils.R
| with_progress_signal | R Documentation |
Helper function that wraps a function to report progress after each invocation.
Useful for integrating progress reporting with purrr::map() or furrr::future_map().
with_progress_signal(.f, .p)
.f |
Function to wrap |
.p |
Progressor function created by |
This is an internal utility function used by riemtan's parallel processing functions.
A wrapped function that calls .f(x) and then signals progress via .p().
## Not run:
progressr::handlers("progress")
result <- with_progress({
p <- progressr::progressor(steps = 10)
wrapped_fn <- with_progress_signal(sqrt, p)
lapply(1:10, wrapped_fn)
})
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.