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