Re: [R] How to format Rsuperscript 2 followed by = value

2011-10-03 Thread sina.r
Hi Nevil, the function bquote() should do what you want: (found here: http://r.789695.n4.nabble.com/expression-td904189.html) mtext(bquote(R^2==.(round(summary(mylm)$r.squared,3))),1) Regards, Sina Rüeger -- View this message in context: http://r.789695.n4.nabble.com/How-to-format-Rsuperscript

[R] How to format Rsuperscript 2 followed by = value

2011-10-03 Thread Nevil Amos
I am trying to put an R2 value with R2 formatted with a superscript 2 followed by "=" and the value : the first mtext prints the R2 correctly formatted but follows it with "=round(summary(mylm)$r.squared,3)))" as text the second prints "R^2 =" followed by the value of round(summary(mylm)$r.squ