[R] how to extract information from anova results

Luis Borda de Agua lbagua at gmail.com
Tue Jul 13 16:35:30 CEST 2010


Hi, 

I have used the instruction aov in the following manner:

res <- aov(qwe ~ asd)

when I typed "res" I get:
_________
Call:
   aov(formula = qwe ~ asd)

Terms:
                      asd Residuals
Sum of Squares  0.0708704 0.5255957
Deg. of Freedom         1         8

Residual standard error: 0.2563191 
Estimated effects may be unbalanced
_________

I need to access the value of the Sum of Squares (i.e. I want another variable to be equal to it, e.g myvar <- Sum.of.Squares) . 
I tried names(res) to see which values are accessible, but I couldn't find the Sum of Squares. I had a similar problem when I tried to access the p.value which can be readily SEEN using summary(res).

In general, is there an easy way to access the values generated by an R function?

Thank you, 

LBA



More information about the R-help mailing list