[R] greek letters, text, and values in labels
ggrothendieck at gmail.com
Tue Jul 25 22:41:09 CEST 2006
plot(1:10, main = bquote("Results for" ~ theta == .(theta)))
On 7/25/06, Adrian Dragulescu <adrian_d at eskimo.com> wrote:
> I want to have a title that will look something like:
> "Results for \theta=2.1", given that I have a variable theta=2.1, and
> \theta should show on the screen like the greek letter.
> I've tried a lot of things:
> theta <- 2.1
> plot(1:10, main=expression(paste("Results for", theta, "=", eval(theta))))
> or using bquote
> plot(1:10, main=paste("Results for ", bquote(theta == .(theta))))
> or using substitute, etc. I could not make it work. This should be easy.
> I would appreciate your help.
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help