How do I use variables in Latex expressions in R?
For example:
plot(X, Y, main=expression(R^2))
Will put R with a nice superscripted 2
Well this works...
call(':', quote(R^2), a)
though it feels a little hacky to me since it's using R's : operator, whereas you just want to stick some text on the end. Maybe there's a better way?