Skip to content
Prev 40343 / 63421 Next

Is it possible to define a function's arguments via a wildcard in 'substitute()'?

I think for the case where you want to built up a call from a function
name + list of arguments, it's best to use call or as.call:

call("f", a = 1, b = 2, c = 3)

or if you already have the list:
l <- list(as.name("f"), a = 1, b = 2, c = 3)
as.call(l)

Hadley

On Thu, May 26, 2011 at 10:15 AM, Janko Thyson
<janko.thyson.rstuff at googlemail.com> wrote: