[R] Problem with package development

Rolf Turner rolf.turner at xtra.co.nz
Sat Jun 4 02:23:33 CEST 2011


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.



More information about the R-help mailing list