verboseApply: Verbose apply function

Description Usage Arguments Examples

View source: R/verboseApply.R

Description

This apply function has a progress bar and enables computations in parallel. By default it is not verbose. As an interactive version with proper 'verbose' output by default please use vmap.

Usage

1
verboseApply(x, f, ..., .mc = 1, .mapper = mclapply, .bar = "none")

Arguments

x

(vector)

f

(function)

...

arguments passed to .mapper and hence f

.mc

(integer) the number of processes to start

.mapper

(function) the actual apply function used. Should have an argument mc.cores.

.bar

(character) one in 'none', '.' or 'bar'

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
verboseApply(
  1:4,
  function(...) Sys.sleep(1),
  .bar = "bar",
  .mc = 2 
)

## End(Not run)

wahani/dat documentation built on Jan. 22, 2018, 10:19 p.m.