[R] extracting elements from summary(aov object)
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Tue Sep 24 19:11:57 CEST 2002
Bill Shipley <Bill.Shipley at Usherbrooke.ca> writes:
> 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.
R seems to require an extra [[1]] bit before $"F value". Don't ask me
why...
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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