An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090104/67b87d2b/attachment-0001.pl>
Combining greek letters with the contents of variables
3 messages · Ingeborg Schmidt, Uwe Ligges, Gabor Grothendieck
I feel this becomes a frequently asked question, hence I tried Google and typed "R main expression greek" --- and got an answer: https://stat.ethz.ch/pipermail/r-help/2006-July/109934.html Uwe Ligges
Ingeborg Schmidt wrote:
Dear r-help list,
I am trying to combine a greek letter lambda with the contents of a variable v in the title of a plot. However, it seems that having v inside the expression() function causes it not to be evaluated, on the other hand having expression(lambda) inside something else like paste causes it to be evaluated to a string. Here is an example of what I want to do:
title(main=expression("Value of "*Lambda*paste(" = ",v,sep="")))
Is there any solution for this?
Cheers,
Ingeborg Schmidt
[[alternative HTML version deleted]]
______________________________________________ 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.
The paste in that answer could be eliminated using ~ :
plot(1:10, main= bquote("Results for" ~ pi == .(pi)))
On Sun, Jan 4, 2009 at 11:17 AM, Uwe Ligges
<ligges at statistik.tu-dortmund.de> wrote:
I feel this becomes a frequently asked question, hence I tried Google and typed "R main expression greek" --- and got an answer: https://stat.ethz.ch/pipermail/r-help/2006-July/109934.html Uwe Ligges Ingeborg Schmidt wrote:
Dear r-help list,
I am trying to combine a greek letter lambda with the contents of a
variable v in the title of a plot. However, it seems that having v inside
the expression() function causes it not to be evaluated, on the other hand
having expression(lambda) inside something else like paste causes it to be
evaluated to a string. Here is an example of what I want to do:
title(main=expression("Value of "*Lambda*paste(" = ",v,sep="")))
Is there any solution for this?
Cheers,
Ingeborg Schmidt
[[alternative HTML version deleted]]
______________________________________________ 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.
______________________________________________ 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.