Build a wrapped function that applies to each unique argument in a vector of arguments once.
VectorizeM(
FUN,
vectorize.args = arg.names,
SIMPLIFY = TRUE,
USE.NAMES = TRUE,
UNLIST = FALSE
)
function to apply
a character vector of arguments which should be vectorized. Defaults to first argument of FUN. If set must be length 1.
logical or character string; attempt to reduce the result to a vector, matrix or higher dimensional array; see the simplify argument of sapply.
logical; use names if the first ... argument has names, or if it is a character vector, use that character vector as the names.
logical; if TRUE try to unlist the result.
adapted function (vectorized with one call per different value).
Only sensible for pure side-effect free deterministic functions.