Iterator function with echolocatoR-themed progress bar.
batapply(
X,
FUN = function(l) Sys.sleep(5/100),
apply_func = lapply,
total = length(X),
name = NULL,
.envir = parent.frame(),
cli.progress_show_after = 0,
clear = FALSE,
color1 = cli::col_br_cyan,
color2 = cli::col_br_magenta,
...
)a vector (atomic or list) or an expression
object. Other objects (including classed objects) will be coerced
by base::as.list.
the function to be applied to each element of X:
see ‘Details’. In the case of functions like
+, %*%, the function name must be backquoted or quoted.
Iterator function to use (default: lapply).
Passed to cli_progress_bar().
Name of the progress bar, a label, passed to
cli_progress_bar().
Passed to cli_progress_bar().
How long to wait before showing the progress bar.
Whether to remove the progress bar from the screen after
it has terminated. Defaults to the cli.progress_clear option, or
TRUE if unset.
First color to use in the palette.
Second color to use in the palette.
Additional arguments passed to apply_func.
A (named) list.
out <- batapply(X = seq_len(30))
#> ⠙ [ 0%] 🧬 ))>))>))>))>))>))>))>))>))>))>))>))>))>))>))>))>))>))>))>))>))>))…
#> ⠙ [100%] 🧬 🦇
#>