[R] Howto convert Linear Regression data to text

ashz ashz at walla.co.il
Wed Aug 24 20:27:18 CEST 2011


Dear all,

How can I covert lm data to text in the form of "y=ax+b, r2" and how do I
calculate R-squared(r2)?

Thanks. 
 
Code:
x=18:29
y=c(7.1,7,7.7,8.2,8.8,9.7,9.9,7.1,7.2,8.8,8.7,8.5)
res=lm(y~x)

--
View this message in context: http://r.789695.n4.nabble.com/Howto-convert-Linear-Regression-data-to-text-tp3766230p3766230.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list