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)

Example output

Loading required package: aoos

Attaching package: 'dat'

The following object is masked from 'package:base':

    replace

[[1]]
NULL

[[2]]
NULL

[[3]]
NULL

[[4]]
NULL

dat documentation built on July 1, 2020, 7:11 p.m.