[R] identical calls are not equal !?

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Wed Jun 12 17:12:43 CEST 2002


Peter Dalgaard BSA <p.dalgaard at biostat.ku.dk> writes:

> 
> Shorter version:
> 
> b <- quote(f())
> a <- b
> a==b
> 
> It's a bug. The intention of the code in do_relop_dflt is that calls are
> equal if they deparse to the same string. 
> 
> However, this is plain wrong:
> 
> 67              SET_STRING_ELT(tmp, 0, (iS) ? PRINTNAME(x) : deparse1(x, 0));
> 68              REPROTECT(x = tmp, xpi);
> 
> since deparse1(x, 0) is a SEXP and not a string.

Not quite. It's supposed to be a SEXP, but a CHARSXP and not a STRSXP.
The fix is simple enough to be committed for 1.5.1, I think.

-- 
   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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list