Learn R Programming

reval (version 3.0-0)

evalmany: Repeated evaluations (Backwards Compatibility)

Description

Evaluate a function repeatedly across argument sets or permutations. This function is included for backwards compatibility with prior versions of `package:reval` and will be defunct in future releases.

Usage

evalmany(
  fun,
  ...,
  method = c("ofat", "permute", "set"),
  sample = 0L,
  default.args = list(),
  collate = TRUE,
  collate.id = c("single", "multi"),
  collate.prepend = "",
  collate.fun = identity,
  clusters = 1L,
  packages = NULL
)

Arguments

fun

The function to be evaluated.

...

Arguments to be varied when evaluating fun, where each argument in '...' is a (named) vector or list of values. Lists of multi-value objects (e.g. data.frames) should be named explicitly and may otherwise produce unexpected or incorrect names.

method

The sensitivity analysis method to be used. Can be either one-factor-at-a-time ("ofat") evaluation, evaluation of parameter sets ("set"), or (sampled) permutations of parameter sets ("permute"). When method = "ofat", the first element of each argument in '...' is assumed to be the "default" value of that argument.

sample

If method = "permute", the number of parameter permutations to evaluate (sampling without replacement). If sample < 1 (the default) then all possible permutations are evaluated.

default.args

Named list of additional arguments passed to fun.

collate

Whether to collate the results or not. If TRUE, output elements will be coerced into data.frames using as.data.frame. Otherwise, the raw outputs will be returned as a named list.

collate.id

If collate = TRUE, the method used to store the evaluation identifiers. If collate.id = "single", a single column named 'id' is used. If collate.id = "multi", one column is created for each argument in '...', e.g. 'arg1', 'arg2', etc.

collate.prepend

A character string prepended to the identifier column. If collate.id = "single", the identifier column will be named <collate.prepend>id. If collate.id = "multi", identifier columns will be named as <collate.prepend><arg> where arg is an element of '...'.

collate.fun

If collate = TRUE, an optional function for reshaping the output of each evaluation prior to coercing and collating the outputs.

clusters

Number of clusters to use for parallel (multisession) processing. Default is 1 (serial computation).

packages

Not used, included for backwards compatibility.

Value

If collate = TRUE, a data.frame. Otherwise, a named list.