A progress bar version of lapply without boilerplate overhead

jstapply(X, FUN, flag, ...)

Arguments

X

a vector (atomic or list) or an expression object. Other objects (including classed objects) will be coerced by base::as.list.

FUN

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.

flag

placeholder not currently implemented to specify pre-bar flag

...

optional arguments to FUN.

Examples

if (FALSE) { 
lapply(1:3, function(x) Sys.sleep(x))
# compared with:
jstapply(1:3, function(x) Sys.sleep(x))
}