Hello, I'm trying to put a mathematical expression into a legend, but R complains about a syntax error. Basically i'd like to do this: legend.text = c(expression(x < 10), expression(x >= 10)) The manual says that one can only pass mathematical expressions to axis, text etc. but not to the legend command? Is there a workaround for this? thanks a lot for help, Arne -- Arne Mueller Biomolecular Modelling Laboratory Imperial Cancer Research Fund 44 Lincoln's Inn Fields London WC2A 3PX, U.K. phone : +44-(0)207 2693405 | fax :+44-(0)207-269-3534 email : a.mueller at icrf.icnet.uk | http://www.bmm.icnet.uk -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi> I'm trying to put a mathematical expression into a legend, but R > complains about a syntax error. Basically i'd like to do this: > > legend.text = c(expression(x < 10), expression(x >= 10))The following works for me on 1.4.0 (yukky alignment which should be fixed in 1.4.1) ... plot(1:20, pch=rep(1:2, c(9, 11))) legend(6, 4, c(expression(x < 10), expression(x >= 10)), pch=1:2)> The manual says that one can only pass mathematical expressions to axis, > text etc. but not to the legend command?Could you let us know where it says that -- sounds like it will need fixing. Thanks. Paul -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._