Hi lmri.
You could do this by doing something like this:
Getting an Anova first:#
utils::data(npk, package="MASS")
( npk.aov <- aov(yield ~ block + N*P*K, npk) )
summary(npk.aov) # I want the P value from this summary of aov object.
#here is the code:
summary(npk.aov)[[1]]$P
# [1] 0.015938790 0.004371812 0.474904093 0.028795054 0.263165283
0.168647879
# [7] 0.862752086 NA
# the last one is of the P value for the residuals, which doesn't exist - so
returns NA.
#so you might wanna use:
na.omit(summary(npk.aov)[[1]]$P)
Now you have a vector of P values, and you could do whatever you want with
it...
Cheers,
Tal
On Wed, May 13, 2009 at 1:32 PM, Imri <bisrael@agri.huji.ac.il> wrote:
>
> Hello!!!
> I'm trying to do multiple ANOVA tests with R (testing the affect off
> different factors on the same response). As a result I get many ANOVA
> tables, and I want to extract a list of the "Pr(>F)" from all
the tables.
> Maybe someone have an idea how to do this?
> Thanks
> Imri
>
> --
> View this message in context:
> http://www.nabble.com/Multiple-ANOVA-tests-tp23518637p23518637.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@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.
>
--
----------------------------------------------
My contact information:
Tal Galili
Phone number: 972-50-3373767
FaceBook: Tal Galili
My Blogs:
http://www.r-statistics.com/
http://www.talgalili.com
http://www.biostatistics.co.il
[[alternative HTML version deleted]]