Displaying 1 result from an estimated 1 matches for "placey2".
Did you mean:
placey
2012 May 22
1
Adding Text to a Plot
...Plotting
plot(x,y, main="Linear Regression", col="red")
abline(lm1, col="blue")
placex <- par("usr")[1]+.1*(par("usr")[2]-par("usr")[1])
placey1 <- par("usr")[3]+.9*(par("usr")[4]-par("usr")[3])
placey2 <- par("usr")[3]+.8*(par("usr")[4]-par("usr")[3])
# HERE: Is this the right way?
text(x=placex, y=placey1,
bquote(R^2 == .(summary(lm1)$r.squared)), adj=c(0,0))
text(x=placex, y=placey2,
bquote(R^2 == .(summary(lm1)$adj.r.squared)), adj=c(0,0))
te...