From deepayansarkar@yahoo.com  Mon Jul  9 19:41:31 2001
From: deepayansarkar@yahoo.com (Deepayan Sarkar)
Date: Mon, 9 Jul 2001 11:41:31 -0700 (PDT)
Subject: [Rd] The ... argument
In-Reply-To: <20010708202636.26286.qmail@web9305.mail.yahoo.com>
Message-ID: <20010709184131.38498.qmail@web13903.mail.yahoo.com>


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


[Rd] The ... argument
Deepayan Sarkar