I'm trying to format the legend in my plot, but I have to use expression() because of greek and superscripts. However, when I want to display r^2 = 0.45, P<0.0001, I get r^2 = 0.45 P<1e-04, when I type in
legend(expression(r^2==0.9230~~P<0.0001))
I tried looking up the list() function but it doesn't help with the commas. I couldn't find anything on using decimals in the expression() function either.
Any suggestions would be appreciated.
Thanks