R's UseMethod() does not dispatch on changed class() (PR#167)
Thu, 15 Apr 1999 23:50:21 +0200
Robert Gentleman <firstname.lastname@example.org> writes:
> Does that mean that our implementaion of substitute is not quite
> right? The documentation suggests that you get the expression typed as
> the value of a formal argument; right now we're getting the current
No. It means that S's implementation is quite wrong...
R's substitute works by fairly clean rules of (lazy) evaluation: If
you pass it a an expression containing x and x is a PROMSXP, you get
the argument expression. If you change x before the substitute, you get
the current value (unless you used x<-delay(something), in which case
you get the unevaluated something).
S does --- something else:
This, I *really* don't think we want to emulate.
The documentation is badly off, though... and the quote() doc is
really off target. (I've written about this before, but it never found
its way to the help page, obviously).
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (email@example.com) FAX: (+45) 35327907
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: firstname.lastname@example.org