I want to write a R-squared term for my legend but I do not know how. Could someone help me please? My legend syntax is:
legend(2,10, c(\"BW (MPE=3%, R-squared=0
It will work if you combine bquote and as.expression:
bquote
as.expression
plot(1:10) legend(2, 10, c(as.expression(bquote("BW (MPE = 3%," ~ R^2 ~ "= 0.77)")), as.expression(bquote("MY (MPE = 5%," ~ R^2 ~ "= 0.80)"))), pch=c(2,3))