Re: [R] Greek letters in plots

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Wed 02 Nov 2005 - 02:16:29 EST

Marc Schwartz <MSchwartz@mn.rr.com> writes:

> Try this:
>
> cor2 <- 0.74
> plot(1:5)
> title(bquote(rho == .(cor2)))
>
> See ?plotmath and ?bquote for more information, noting the use of
> the .(Variable) syntax for variable substitution.

Yep, bquote() is nice. Other solutions include

  substitute(rho == . , list( . = cor2))

which I suppose is pretty much what bquote does internally

-- 
   O__  ---- Peter Dalgaard             ุster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)                  FAX: (+45) 35327907

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Wed Nov 02 02:22:11 2005

This archive was generated by hypermail 2.1.8 : Wed 02 Nov 2005 - 05:14:33 EST