Re: [R] Multiple ANOVA tests

2009-05-27 Thread Mike Lawrence
you could use ldply from the plyr package: p = ldply(q,function(x){x$P}) Without you data I can't confirm that works, but something like that should do it On Wed, May 27, 2009 at 9:23 AM, Imri wrote: > > Thanks for the answer!!! > I Know how to extract the Pr(>F) value from single ANOVA table,

Re: [R] Multiple ANOVA tests

2009-05-27 Thread Imri
Thanks for the answer!!! I Know how to extract the Pr(>F) value from single ANOVA table, but I have a list of many ANOVA tables recived by : a<-function(x)(aov(MPH~x)) q<-apply(assoc[,18:20],2,a) # just for example, I have more than 3 factors(x) > print(q) $X11_20502 Df Sum Sq Mean

Re: [R] Multiple ANOVA tests

2009-05-27 Thread Mike Lawrence
#create some data y=rnorm(20) x=factor(rep(c('A','B'),each=10)) #run the anova my_aov = aov(y~x) #summarize the anova my_aov_summary = summary(my_aov) #show the anova summary print(my_aov_summary) #lets see what's in the summary object str(my_aov_summary) #looks like it's a list with 1 element

[R] Multiple ANOVA tests

2009-05-27 Thread Imri
Hi all - I'm trying to do multiple one-way ANOVA tests of different factors on the same variable. As a result I have a list with all the ANOVA tables, for exemple: $X11_20502 Analysis of Variance Table Response: MPH Df Sum Sq Mean Sq F valuePr(>F) x 3 369.9 123.

Re: [R] Multiple ANOVA tests

2009-05-13 Thread Tal Galili
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.0

[R] Multiple ANOVA tests

2009-05-13 Thread Imri
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