Message-ID: <x2d7s96s8s.fsf@blueberry.kubism.ku.dk>
Date: 1999-12-14T23:02:27Z
From: Peter Dalgaard
Subject: "formula plotting" -> substitute pecularity
In-Reply-To: Martin Maechler's message of "Tue, 14 Dec 1999 18:27:36 +0100 (MET)"
Martin Maechler <maechler at 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 at 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 at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._