sapply_pb: sapply with a progress bar

View source: R/utils.r

sapply_pbR Documentation

sapply with a progress bar

Description

Can be used like standard base:::sapply. The only thing it does is create an additional progress bar.

Usage

sapply_pb(X, FUN, ...)

Arguments

X

see ?sapply for parameter explanation

FUN

see ?sapply

...

see ?sapply

Value

list see ?sapply

See Also

sapply()

Examples

## Not run: 

l <- sapply(1:20000, function(x) list(rnorm(1000)))
head(sapply_pb(l, mean))

# performance comparison
l <- sapply(1:20000, function(x) list(rnorm(1000)))
system.time(sapply(l, mean))
system.time(sapply_pb(l, mean))

## End(Not run)

markheckmann/OpenRepGrid documentation built on April 14, 2024, 8:15 a.m.