[R] expression() help

Thomas Lumley tlumley at u.washington.edu
Fri Feb 12 21:28:24 CET 2010

On Fri, 12 Feb 2010, Peng Cai wrote:

> Hi All,
> I'm trying to use expression() for y-label in plot(). I'm not able to write
> Average(space)PM(subscript)10. I'm trying:
> ylab=expression(Average PM[10])
> and its not working, because of a space between "Average" and "PM". Thanks,

quote("Average PM"[10]) or quote(Average~PM[10]) seem to work.  There is an example of the first style in ?plotmath.


Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle

More information about the R-help mailing list