[R] Greek letters in plots
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Tue Nov 1 16:16:29 CET 2005
Marc Schwartz <MSchwartz at 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 at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list