apply_pb: apply with a progress bar...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

apply with a progress bar

Usage

1
apply_pb(X, MARGIN, FUN, ...)

Arguments

X

see ?apply for parameter explanation

MARGIN

see ?apply

FUN

see ?apply

...

see ?apply

Details

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

Value

see ?apply

Author(s)

Mark Heckmann

See Also

apply

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 

apply_pb(anscombe, 2, sd, na.rm=TRUE)

# larger dataset
df <- data.frame(rnorm(30000), rnorm(30000))
head(apply_pb(df, 1, sd))

# performance comparison
df <- data.frame(rnorm(90000), rnorm(90000))
system.time(apply(df, 1, sd))
system.time(apply_pb(df, 1, sd))


## End(Not run)

OpenRepGrid documentation built on May 2, 2019, 4:54 p.m.