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". Thank you in advance for any replies! Ales Ziberna I am running binary version of R 2.0.1 (and R 1.9.1) on Windows XP Here are the R 2.0.1 version details: $platform [1] "i386-pc-mingw32" $arch [1] "i386" $os [1] "mingw32" $system [1] "i386, mingw32" $status [1] "" $major [1] "2" $minor [1] "0.1" $year [1] "2004" $month [1] "11" $day [1] "15" $language [1] "R"> .Platform$OS.type [1] "windows" $file.sep [1] "/" $dynlib.ext [1] ".dll" $GUI [1] "Rgui" $endian [1] "little"
Ale. .iberna 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 >