Peter Dalgaard BSA (p.dalgaard@biostat.ku.dk)
15 Dec 1999 00:02:27 +0100
Martin Maechler <maechler@stat.math.ethz.ch> writes:
> This is something between a question and a bug report.
> {sometimes one should first ask on R-help before sending to R-bugs....}
..
> ## This ``should'' work, but does not :
>
> e2 <- substitute(T(x[1],...,x[n])*", "*N[1] == n1, list(n1=nn))
>
> ##>> Error: ... used in an incorrect context
I think that is a bug. Simplest variant:
> substitute(a(...))
Error: ... used in an incorrect context
I think the basic issue is that when you use ... in a function,
substitute will try to match it against the actual parameter list,
e.g.
> f<-function(...)substitute(a(...))
> f(2)
a(2)
> f(2,3,4)
a(2, 3, 4)
However, when there's no ... argument to f, substitute will complain,
as would any other function trying to handle ... but the semantics of
substitute should be different.
Robert?
-- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help 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-help-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
This archive was generated by hypermail 2.0b3 on Tue 04 Jan 2000 - 13:34:03 EST