[R] extracting elements from summary(aov object)

Bill Shipley Bill.Shipley at Usherbrooke.ca
Tue Sep 24 20:19:39 CEST 2002


Hello.  When one types "summary(fit)", where fit is an object from a call 
to aov(), one gets an ANOVA table.  I want to save just one element of this 
summary.  How does one extract this?

As an example, here is my output from a split plot ANOVA:

 > summary(out)$"Error: soil.cores$block:soil.cores$treatment"
                      Df  Sum Sq Mean Sq F value Pr(>F)
soil.cores$block      3 0.63626 0.21209  1.0557 0.4147
soil.cores$treatment  3 0.90276 0.30092  1.4978 0.2802
Residuals             9 1.80813 0.20090

I want to save only the F value of "soil.cores$treatment" .  In SPLUS one 
would do this by
summary(out)$"Error: soil.cores$block:soil.cores$treatment"$"F value"[2] 
but this doesn't seem to work.

Thanks.

Bill Shipley
Departement de biologie
Universite de Sherbrooke
Sherbrooke (Quebec) CANADA J1K 2R9
Bill.Shipley at USherbrooke.ca
http://callisto.si.usherb.ca:8080/bshipley/

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list