Dan Kelley <kelley.dan <at> gmail.com> writes: > > > I have data in a file named hands.dat, which is given at the end of this > question. (It's from a stats textbook example on anova). I'd like to do an > aov on this, which I guess would be > > d <- read.table("~/hands.dat", header=TRUE) > > aov(Bacterial.Counts ~ Water + Soap + Antibacterial.Soap + Alcohol.Spray, > data=d) > > Data file (hands.dat) > ============ > > Bacterial.Counts Method > 74 Water > 84 Soap > 70 Antibacterial.Soap > 51 Alcohol.Spray
To be sure that data are ok, first try str(d) Method should be factor. aov(BacterialCounts~Method,data=d) Dieter ______________________________________________ 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.