[R] How to call R-squared values from lm's?

2010-12-02 Thread Wegan, Michael (DNRE)
I would like to call both p-values and R-squared values from lm's in a function. I can get the p-values from coef(summary(name.lm))[r,c], however, I cannot figure out how to call the R-squared values without manually calling the summary and inserting them in the script - which negates the

Re: [R] How to call R-squared values from lm's?

2010-12-02 Thread Roland Rau
On 12/02/2010 03:15 PM, Wegan, Michael (DNRE) wrote: I would like to call both p-values and R-squared values from lm's in a function. I can get the p-values from coef(summary(name.lm))[r,c], however, I cannot figure out how to call the R-squared values without manually calling the summary

Re: [R] How to call R-squared values from lm's?

2010-12-02 Thread Marc Schwartz
On Dec 2, 2010, at 8:15 AM, Wegan, Michael (DNRE) wrote: I would like to call both p-values and R-squared values from lm's in a function. I can get the p-values from coef(summary(name.lm))[r,c], however, I cannot figure out how to call the R-squared values without manually calling the