[R] do.call("+", ...)

Peter Dalgaard p.dalgaard at biostat.ku.dk
Fri Nov 17 16:09:27 CET 2006


"Gabor Grothendieck" <ggrothendieck at gmail.com> writes:


> > > Aha, the dreaded "..1" argument.   Where do I look for documentation
> > > on this?
> > >
> > > [It is mentioned twice in The R Language Definition, but I'm no wiser]
> >
> > It's just the first of the ... arguments, essentially list(...)[[1]],
> > except for lazy evaluation details. The second one is ..2, and
> > so forth.
> 
> What are you referring to when writing "except for lazy function details"?

That's not what I wrote...

Try

g <- function(...) list(...)[[1]] 
h <- function(...) ..1

g((print("Hey")), (print("Joe")))
h((print("Hey")), (print("Joe")))

and you should become enlightened. Bonus points for figuring out why I
parenthesized the arguments.

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907



More information about the R-help mailing list