[R] inconsistency between gamma and choose functions

Jari Oksanen jarioksa at cc.oulu.fi
Fri Dec 14 07:29:25 CET 2001


siim at obs.ee said:
> one should always consider
> if( abs( real1 - real2) < very.small.number)

And then one could be surprised after finding that a == b and b == c, 
but a != c. I guess this is the reason why R refuses to have a `fuzz 
factor' in comparisons (like Peter Dalgaard wrote earlier in another 
thread with the same question). Of course, the way Ott Toomet suggested 
above is the normal way of doing things.

I hope nobody dealing with Italian Lira will sue R for financial 
damages due to following:

> data(euro)
> (1/euro)*euro == 1
  ATS   BEF   DEM   ESP   FIM   FRF   IEP   ITL   LUF   NLG   PTE 
 TRUE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE FALSE  TRUE  TRUE  TRUE 

(Putting `signif( , 6) helps in this case, but not necessarily -- or 
even usually -- in comparisons.)
cheers, jari oksanen

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