>>>>> Liaw, Andy <andy_l...@merck.com> >>>>> on Mon, 16 Aug 2010 08:22:33 -0400 writes:
> From: Stephen Liu >> >> Hi JesperHybel, >> >> Thanks for your advice. >> >> >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) >> >> >> Your advice works for me. Sorry I missed "aov" before(test01$count ~ >> test01$spray) > I just want to offer another point: If you see any > tutorial/document/book advising you to use model formula as above; e.g., > anything like > df$var1 ~ df$var2 + df$var3 > Just run away from it as fast as you can, and try to wipe it from your > memory. That's about the worst way to use a model formula, and very > likely to give you what may seem to be strange problems down the road. > Well-written model fitting functions should be called like this: > modelfn(var1 ~ var2 + var3, data=df, ...) YES, indeed, do run away from such bad R teaching... and maybe really consider reading the tutorials and manuals we list on http://www.r-project.org/ or buy a good (not thick!) book introducing R rather than watching some youtube videos... Do people now go to Youtube instead of to School and University? O tempora, o mores! Martin ______________________________________________ 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.