R-alpha: c(..., a) fails [in a function(x, ...)]
Martin Maechler
Martin Maechler <maechler@stat.math.ethz.ch>
Thu, 30 Oct 1997 11:40:36 +0100
A minor inconsistency to S which can (I think did) break existing code
(ported from S to R):
In R, the "..." arguments cannot be passed to 'c(..)' :
ex3.. <- function(...) c(...,exp(1))
ex3..()# 2.718282
##R Error: ... used in an incorrect context
ex3..(1:2)# 1 2 2.718282
##R Error: ... used in an incorrect context
##--- Only this one works in R 0.60 (Oct.28) also:
ex4.. <- function(...) c(unlist(list(...)),exp(1))
ex4..()# 2.718282
ex4..(1:2)# 1 2 2.718282
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=