Re: [R] how to get the value of aov summary into another variable

2008-10-28 Thread Jorge Ivan Velez
Dear Waverley, Try # Data x=rnorm(10) y=rep(1:2,5) aov.ex = aov(x~y) tail(unlist(summary(aov.ex)),2) # or anova(lm(x~y))$"Pr(>F)" HTH, Jorge On Tue, Oct 28, 2008 at 8:48 PM, Waverley <[EMAIL PROTECTED]>wrote: > Hi, > > I have a question of aov. e.g. > > aov.ex = aov(x~y) > summary(aov.ex

Re: [R] how to get the value of aov summary into another variable

2008-10-28 Thread Peter Alspach
Waverley In general, examine the structure of the object and go from there. Thus: str(summary(aov.ex)) will reveal that summary(aov.ex) is a list of 1. Thus you probably want to examine that single element in more detail: str(summary(aov.ex)[[1]]) # the [[1]] to get the first element of the l