[R] Changes in expression in R 2.0.1

Aleš Žiberna ales.ziberna at guest.arnes.si
Tue Jan 11 13:56:46 CET 2005


Thank  you very  much!

I guess I need a new dictionary!

Ales Ziberna


----- Original Message ----- 
From: "Uwe Ligges" <ligges at statistik.uni-dortmund.de>
To: "Aleš Ziberna" <ales.ziberna at guest.arnes.si>
Cc: "R-help" <r-help at stat.math.ethz.ch>
Sent: Tuesday, January 11, 2005 12:47 PM
Subject: Re: [R] Changes in expression in R 2.0.1


Aleš Ziberna wrote:
> Hello!
>
>
>
> plot(1:10,main=expression(1 <= "m" <= 5))
>
> The above command works perfectly in R 1.9.1 but returns an error in R 
> 2.0.1
>
>
>
> This is documented in NEWS for R 2.0.0 (or ONEWS in R 2.0.1) and it is 
> said:
>
> o   R no longer accepts associative use of relational operators.
>      That is, 3 < 2 < 1 (which used to evalute as TRUE!) now causes
>      a syntax error.  If this breaks existing code, just add
>      parentheses -- or braces in the case of plotmath.
>
>
>
> It is true that the following command does not give en error, however, I 
> do
> not what the extra brackets in the plot:
>
> plot(1:10,main=expression(1 <= ("m" <= 5)))
>
>
>
> Is it possible to have this thing plotted with the same look as in R 
> 1.9.1?
> I apologize if the instruction are in NEWS, since I am not sure how to
> interpret exactly this section (especially : "just add parentheses -- or
> braces in the case of plotmath".

A good dictionary should tell you that {} rather than () is meant with
"braces":

   plot(1:10,main=expression(1 <= {"m" <= 5}))

You have to group it syntactically, that's all.

Uwe Ligges


>
>
> Thank you in advance for any replies!
>
> Ales Ziberna
>




More information about the R-help mailing list