[Rd] The ... argument

Deepayan Sarkar deepayansarkar@yahoo.com
Mon, 9 Jul 2001 11:41:31 -0700 (PDT)


I'm defining the following functions:

> foo1 <- function(...) print(match.call())
> foo2 <- function(...) foo1(...)

My understanding is that foo2 defined as above should
behave exactly like foo1 (and also that this sort of
usage is quite common). However, what I'm getting is:

> foo1(a = F, b = list()); foo2(a = F, b = list())
foo1(a = F, b = list())
foo1(a = ..1, b = ..2)

However, if the values of the arguments are constants,
there appears to be no problem, e.g.:

> temp <- 10
> foo1(a = temp, b = 10, ab = FALSE); foo2(a = temp,
+ b = 10, ab = FALSE)
foo1(a = temp, b = 10, ab = FALSE)
foo1(a = ..1, b = 10, ab = FALSE)

Any explanations/suggestions ?

Deepayan


__________________________________________________
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._