Re: [R] a < b < c is alway TRUE

About this list Date view Thread view Subject view Author view Attachment view

From: David Meyer (david.meyer@ci.tuwien.ac.at)
Date: Fri 06 Jul 2001 - 23:09:04 EST


Message-id: <3B45B870.3F496F49@ci.tuwien.ac.at>

Till Baumgaertel wrote:
>
> > 3 < 2 < 1 # [1] TRUE ???
> this is evaluated from left to right:
> (3<2)<1
>
> 3<2 = FALSE
> FALSE<1 = TRUE
>
> what's surprising is the following:
> > FALSE<1
> [1] TRUE
> > FALSE>1
> [1] FALSE
> > TRUE<1
> [1] FALSE
> > TRUE>1
> [1] FALSE
>
> because of symmetry i'd expect TRUE>1 to be TRUE.

Not surprising at all; the symmetric case is

> T>0
[1] TRUE
> T<0
[1] FALSE

TRUE is neither greater nor less than 1; it's exactly 1.
And also note that not(<) is >=, and not >.

-d

>
> cu
> till
>
> --
> "I have seen things you people wouldn't believe.
> Attack-ships on fire off the shoulder of Orion.
> I watched seabeams glitter in the dark near the
> Tannhauser gate.
> All those moments will be lost in time like
> tears in rain. Time to die." (Roy)
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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@stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

-- 
Mag. David Meyer			Wiedner Hauptstrasse 8-10
Vienna University of Technology		A-1040 Vienna/AUSTRIA
Department for Statistics, Probability	Tel.: (+431) 58801/10772
Theory and Actuarial Mathematics	mail: david.meyer@ci.tuwien.ac.at
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Wed 10 Mar 2004 - 08:18:19 EST