[R] greater-than-or-equal-to symbol in a legend

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Jun 6 08:52:01 CEST 2005


On Sun, 5 Jun 2005, Krista Chin wrote:

> I am unable to get the greater-than-or-equal-to symbol (?) in a legend.
> I am able to get pi, squares, sqrt, but not this particular symbol.  Can
> anyone tell me what I am doing wrong?
>
> legend(locator(n=1), legend = c("Observed", expression("Area < 5"* m^2),
> expression("Area >= 5"*m^2)), pch=c(1,16,4), bg="white")

You want >= as part of the expression, not part of a character string.
I suspect

 	expression(Area >= 5*m^2)

is what you intended.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list