do.call
The do.call
can be somewhat slow, especially when working
with large objects. This function is based upon the suggestions from Hadley
Wickham on the R mailing list, see
here.
Also thanks to Tommy at StackOverflow for
suggesting
how to handle double and triple colon operators, ::
, further enhancing
the function.
fastDoCall(what, args, quote = FALSE, envir = parent.frame())
either a function or a non-empty character string naming the function to be called.
a list of arguments to the function call. The
names
attribute of args
gives the argument names.
a logical value indicating whether to quote the arguments.
an environment within which to evaluate the call. This
will be most useful if what
is a character string and
the arguments are symbols or quoted expressions.