| progressify | R Documentation |
Evaluate a regular map-reduce call with progress updates
progressify(
expr,
substitute = TRUE,
...,
when = TRUE,
eval = TRUE,
envir = parent.frame()
)
expr |
An R expression. |
substitute |
If TRUE, |
when |
If TRUE (default), the expression is progressified, otherwise not. |
eval |
If TRUE (default), the progressified expression is evaluated, otherwise it is returned. |
envir |
The environment in which |
... |
Not used. |
Returns the value of the evaluated expression expr.
The transpilation mechanism includes logic to "unwrap" expressions
enclosed in constructs such as !, { }, ( ), local(), I(),
identity(), invisible(), suppressMessages(), suppressWarnings(),
suppressPackageStartupMessages(), withCallingHandlers(), and
with(). The transpiler descends through wrapping
constructs until it finds a transpilable expression, avoiding the
need to place progressify() inside such constructs. This allows for
patterns like:
y <- {
lapply(xs, fcn)
} |> suppressMessages() |> progressify()
avoiding having to write:
y <- {
lapply(xs, fcn) |> progressify()
} |> suppressMessages()
handlers(global = TRUE) # listen to progress updates
xs <- list(1, 1:2, 1:2, 1:5)
y <- lapply(X = xs, FUN = sum) |> progressify()
str(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.