On 04/06/11 00:02, Barry Rowlingson wrote:

<SNIP>
..... someone on
StackOverflow was wondering why "0<= x<= 1" isn't a valid
expression, neither in the context of what he expected (TRUE if x is
between 0 and 1) nor how I explained it would function (as (0<=x)<=
1, and then comparing a TRUE/FALSE against 1) if it were not for the
flagging of comparison operators as non-associative in gram.y in the
source code. I even recompiled R with<= as left associative to check.
Sure enough, I could then type 0<= 5<= 1 as a valid expression and
get TRUE returned.

So does mean that *inevitably*  trying to make "0 <= x <= 1"
syntactically valid will always lead to nonsensical results?  No way
around it?

    cheers,

        Rolf

P. S.  How was the cheese?  Was there any Cheshire?  (Almost impossible
to find in N.Z. these days.  Naturally.  It being my favourite.)

        R.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to