Skip to content
Prev 257782 / 398502 Next

Insert regression coefficients in a graphic.

On Apr 22, 2011, at 2:16 PM, JJCV wrote:

            
> coef(lm(p ~ T)
+ )
(Intercept)           T
      997.40        0.56
 > text(10,1010, labels=paste("Slope =", coef(lm(p ~ T)  )[2]) )

I suppose you could format it with formatC() or sprintf() if you  
wanted it to fewer than 10 decimal places.