Re: [R] how to extract terms from aov

From: talepanda <talepanda_at_gmail.com>
Date: Tue, 01 Apr 2008 00:34:10 +0900

you can access it as a data frame by

> av3<-av2[[1]]

then,

> dimnames(av3)[[1]]

gives you the leftmost labels, and also,

> av3$Df
> av3$Sum

etc, gives the values.

> str(object)

always help you to find out the structure of object and how to access the information.

HTH
> I couldn't find clues from the achieve of R help that allow to retrieve
> the terms of aov.
>
>
> av2<- summary(aov(Prevalence~Random*Bednet*Flight)); av2
>
>
>
> Df Sum Sq Mean Sq F value Pr(>F)
> Targeted 2 2.11e+10 1.05e+10 102.90 < 2e-16 ***
>
> Bednet 2 9.48e+09 4.74e+09 46.35 1.2e-13 ***
>
> Flight 1 1.08e+09 1.08e+09 10.55 0.0018 **
> Targeted:Bednet 4 6.32e+09 1.58e+09 15.45 3.6e-09 ***
>
> Targeted:Flight 2 7.19e+08 3.59e+08 3.51 0.0350 *
> Bednet:Flight 2 5.12e+08 2.56e+08 2.50 0.0889 .
> Targeted:Bednet:Flight 4 3.41e+08 8.53e+07 0.83 0.5082
> Residuals 72 7.37e+09 1.02e+08
>
>
>
> I would like to extract the first unlabeled column: terms like Targeted,
> Bednet... for producing a table, and I know how to extract the others
> such as Df, F...
>
>
>
> Help is appreciated
>
>
>
> Weidong Gu,
>
>
> Department of Medicine
> University of Alabama, Birmingham
> 1900 University Blvd., Birmingham, Alabama 35294
> Email: wgu_at_uab.edu
> PH: (205)-975-9053
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 31 Mar 2008 - 15:52:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 31 Mar 2008 - 16:30:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive