[R] Superstring in text()

Andrej Kastrin andrej.kastrin at gmail.com
Mon Jul 27 07:27:44 CEST 2009


mycor <- cor(1:10,1:10)
plot(1:10,1:10)
text(8,2,bquote(R^2 == .(mycor)))

HTH, Andrej

Murray Pung wrote:
> I'd like to paste a superstring with a number in an object.
> 
> Thanks for any help.
> Murray
> 
> 
> mycor <- cor(1:10,1:10)
> plot(1:10,1:10)
> text(8,2,paste(expression(R^2)," = ",mycor))
> 
> 	[[alternative HTML version deleted]]
>




More information about the R-help mailing list