[Rd] The ... argument

John Chambers jmc@research.bell-labs.com
Mon, 09 Jul 2001 16:30:56 -0400


Deepayan Sarkar wrote:
> 
> I think my earlier example didn't fully represent my
> problem. I'm trying to evaluate the arguments passed
> in via ... by:
> 
> foo1 <- function(...) {
>     eval(as.list(match.call()[-1]))
> 

Why?

The way to get the _evaluated_ ... arguments is
  dotValues <- list(...)

See, for example, under "..." in the index to the "blue book".


> foo2 <- function(...) foo1(...)
> 
> So now,
> 
> > foo1(a=F)
> $a
> F
> 
> > foo2(a=F)
> $a
> ..1
> 
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

-- 
John M. Chambers                  jmc@bell-labs.com
Bell Labs, Lucent Technologies    office: (908)582-2681
700 Mountain Avenue, Room 2C-282  fax:    (908)582-3340
Murray Hill, NJ  07974            web: http://www.cs.bell-labs.com/~jmc
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._