If you're trying to follow the youtube video you have a typing mistake here:
InsectSprays.aov <-(test01$count ~ test01$spray) I think this should be: InsectSprays.aov <-aov(test01$count ~ test01$spray) youre missing the functioncall "aov" on the right hand side of the assignment operator '<-'. the results of the application of function aov() is stored in InsectSprays.aov and is accessed through summary(InsectSprays.aov) since you missed the functioncall you cannot apply TukeyHSD() to InsectSprays.aov I think -- View this message in context: http://r.789695.n4.nabble.com/Learning-ANOVA-tp2323660p2324590.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.