Ggplot2: Adding Regression Line Equation and R2 on graph?

Here is one solution # GET EQUATION AND R-SQUARED AS STRING # SOURCE: goo.gl/K4yh lm_eqn = function(df){ m = lm(y ~ x, df); eq Character(as. Expression(eq)); } p1 = p + geom_text(aes(x = 25, y = 300, label = lm_eqn(df)), parse = TRUE) EDIT. I figured out the source from where I picked this code.

Here is the link to the original post in the ggplot2 google groups.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions