Hi everyone. I'm trying to display the r^2 of a linear regression on a plot using text(...). I first build the string to display. However, I can't find why this is not working (it display literally r^2 instead of r superscript 2). r2string = expression(paste(r^2)," = ", r2); Any help would be greatly appreciated, Phil -- View this message in context: http://r.789695.n4.nabble.com/Mathematical-expression-tp2299253p2299253.html Sent from the R help mailing list archive at Nabble.com.
On 22.07.2010 21:47, Filoche wrote:> > Hi everyone. > > I'm trying to display the r^2 of a linear regression on a plot using > text(...). I first build the string to display. However, I can't find why > this is not working (it display literally r^2 instead of r superscript 2). > > r2string = expression(paste(r^2)," = ", r2); > > Any help would be greatly appreciated, > Philr2string = substitute(r^2 == r2, list(r2=r2)) Uwe Ligges
Hi. This is working fine. Thank you for your help. Best regards, Phil -- View this message in context: http://r.789695.n4.nabble.com/Mathematical-expression-tp2299253p2299364.html Sent from the R help mailing list archive at Nabble.com.