[R] anova and tukeyHSD

Anna H. Pryor anna at ptolemy.arc.nasa.gov
Wed Aug 13 15:27:33 CEST 2003


I would like to do a one way anova and then a tukeyHSD.  I have three vectors 
A,B and C.  In a previous help message, I was told to do the following for 
the anova:

y = c(A,B,C)
group = factor(rep(a:3,c(7,9,13))) #provided there a 7 elements in A,9 in B 
and 13 in C

and then

anova(lm(y~group))


Looking at the tukeyHSD method it looks like it wants the aov method which I 
don't understand.  Using the above example, could someone continue the 
example and get the tukeyHSD method to work?

Anna




More information about the R-help mailing list