Re: [R] Format of numbers in plotmath expressions.

2012-10-07 Thread William Dunlap
ges > Cc: r-help@r-project.org > Subject: Re: [R] Format of numbers in plotmath expressions. > > > > Thanks Uwe. I think your recipe is substantially sexier than mine. > > However I will, I believe, ***NEVER*** understand how to put together > plotmath con

Re: [R] Format of numbers in plotmath expressions.

2012-10-05 Thread Rolf Turner
Thanks Uwe. I think your recipe is substantially sexier than mine. However I will, I believe, ***NEVER*** understand how to put together plotmath constructs. They seem to require some subset of: * expression() * bquote() * substitute() * parse() * paste() * as.express

Re: [R] Format of numbers in plotmath expressions.

2012-10-05 Thread Uwe Ligges
On 05.10.2012 09:30, Rolf Turner wrote: I want to do something like: TH <- sprintf("%1.1f",c(0.3,0.5,0.7,0.9,1)) plot(1:10) legend("bottomright",pch=1:5,legend=parse(text=paste("theta ==",TH))) Notice that the final "1" comes out in the legend as just plain "1" and NOT as "1.0" although TH i

[R] Format of numbers in plotmath expressions.

2012-10-05 Thread Rolf Turner
I want to do something like: TH <- sprintf("%1.1f",c(0.3,0.5,0.7,0.9,1)) plot(1:10) legend("bottomright",pch=1:5,legend=parse(text=paste("theta ==",TH))) Notice that the final "1" comes out in the legend as just plain "1" and NOT as "1.0" although TH is [1] "0.3" "0.5" "0.7" "0.9" "1.0" I can