Re: [R] Multiple comparisons: its a trap!

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Mon 26 Jul 2004 - 14:47:07 EST

Gabor Grothendieck <ggrothendieck@myway.com> writes:

> <Ted.Harding <at> nessie.mcc.ac.uk> writes:
>
> :
> : On 25-Jul-04 Gabor Grothendieck wrote:
> : > Don't know how Python does it but its not the only one and
> : > I believe its often done like this. Rather than have a Boolean
> : > type, NULL is defined to be false and anything else is true.
> : > If the comparison is TRUE then the right argument is returned;
> : > otherwise NULL is returned.
....
> : This is weird, and I'm not sure what is being discussed here.
>
> We were discussing how some other languages string together comparison
> operators without an intermediate and to connect them. This discussion
> has nothing to do with R other than possibly to understand whether it
> could fit within the R framework.

Yes. The other side of the coin is that we do actually use the TRUE/FALSE == 1/0 convention in places. E.g. (x>0)-(x<0) for the sign of x, or x*(x>0) for x left-censored at 0. So changing the current semantics is not really in the cards. Turning x<y<z into a syntax error is on the other hand quite simple (at least according to 5 seconds worth of googling for "yacc nonassoc") and we should probably consider doing so.

-- 
   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@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Mon Jul 26 14:58:43 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:55:13 EST