[R] Expression in plot text

Thomas Lumley thomas at biostat.washington.edu
Wed Dec 6 20:02:42 CET 2000


On Wed, 6 Dec 2000, Trent Piepho wrote:

> I'd like to put a degree symbol in the title of a plot.  Something like:
> 
> plot(1,main=expression("Data at " * 45 * degree * " North"))
> 
> That works fine, but I like the 45 to be the value of a variable, instead of a
> constant, an in:
> 
> lat <- 45
> plot(1,main=expression("Data at " * lat * degree * " North"))

I think you'll find this in the FAQ. In any case.

lat<-45
plot(1,main=substitute("Data at "*lat*degree*" North",list(lat=lat)))


	-thomas

Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list