do.rep: Evaluate a function repeatedly over arbitrary arguments

Description Usage Arguments

View source: R/grid_apply.R

Description

This idiom is really useful to carry out simulations, which are essentially repeated evaluations of a function over a grid of parameter values.

Usage

1
2
do.rep(.f, ..., .reps, .verbose = 1, .rep.cores = 1, .eval = T,
  .args = NULL)

Arguments

.f

function to be evaluated

...

Arguments passed to f

.reps

the number of times the function should be evaluated

.verbose

If 1 (default), prints a . with every completed condition.

.rep.cores

Apply repeates in parallel using mclapply

.eval

If TRUE (default), evaluates f. If FALSE, does not evaluate f.

.args

optional list of (named) arguments to .f If 2, prints the arguments corresponding to the completed condition. If 3, prints the arguments and results of the completed condition.


patr1ckm/distributr documentation built on May 24, 2017, 1:24 a.m.