[R] Greek symbols (again but more complicated)

David Winsemius dwinsemius at comcast.net
Sun Sep 5 18:12:13 CEST 2010


On Sep 5, 2010, at 11:41 AM, John Helly wrote:

> Hi.
>
> I'm trying to get 'mu' to show up as a Greek symbol but, despite  
> trying every example I could find, can't get it to work.  Any  
> insights would be welcome.
>
> This is what I'm using that works, but displays mu with the letter u.
>
> plotTimeXMastPAR <- qplot(DT,MastPAR, data=A, xlab = "", ylab =  
> quote(PAR (uE ~m^-2 ~s^-1)), geom="line") +  
> opts(legend.position="none")
>

I suppose most readers will know by now that qplot is part of ggplot2,  
but it would be better manners to include the require() statement that  
would identify the non-base package, as would inclusion of a working  
example:

require(ggplot2)

qplot(mpg, wt, data=mtcars, ylab=expression(PAR*(mu*E~m^-2~s^-1)))

or
qplot(mpg, wt, data=mtcars, ylab=quote(PAR*(mu*E~m^-2~s^-1)))


> This is an attempt to get mu to look right but it does not work.  It  
> doesn't fail but nothing inside the expression statement gets  
> displayed.
>
> plotTimeXMastPAR <- qplot(DT,MastPAR, data=A, xlab = "", ylab =  
> c("PAR", expression(mu, quote(E ~m^-2 ~s^-1))), geom="line") +  
> opts(legend.position="none")
>
> Cheers.
> --------------
> John Helly, UCSD / San Diego Supercomputer Center / Scripps  
> Institution of Oceanography, Climate, Atmospheric Science, and  
> Physical Oceanography / +01 760 840 8660 mobile / stonesteps  
> (Skype) / stonesteps7 (iChat) / /www.sdsc.edu/~hellyj
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list