----- Original Message ---- From: "Liaw, Andy" <andy_l...@merck.com> To: Stephen Liu <sati...@yahoo.com>; r-help@r-project.org Sent: Sat, August 14, 2010 12:48:33 AM Subject: RE: [R] Learning ANOVA
>Note the names of the variables here. They don't match what you tried >to use in your boxplot() call below. Where did you get the idea that >there are "DO" and "Stream" in the "test01" data frame? Hi Andy, I followed following video to proceed; ANOVA in R http://www.youtube.com/watch?v=Dwd3ha0P8uw&feature=related I fixed it with; > boxplot(test01$count ~ test01$spray) Continued: > InsectSprays.aov <-(test01$count ~ test01$spray) > summary(InsectSprays.aov) Length Class Mode 3 formula call Seems having problem here. > TukeyHSD(InsectSprays.aov) Error in UseMethod("TukeyHSD") : no applicable method for 'TukeyHSD' applied to an object of class "formula" I was still stuck here. B.R. Stephen L ----- Original Message ---- From: "Liaw, Andy" <andy_l...@merck.com> To: Stephen Liu <sati...@yahoo.com>; r-help@r-project.org Sent: Sat, August 14, 2010 12:48:33 AM Subject: RE: [R] Learning ANOVA From: Stephen Liu > > Hi folks, > > R on Ubuntu 10.04 64 bit. > > Performed following steps on R:- > > ### to access to the object > > data(InsectSprays) > > ### create a .csv file > > write.csv(InsectSprays, "InsectSpraysCopy.csv") > > > On another terminal > $ sudo updatedb > $ locate InsectSpraysCopy.csv > /home/userA/InsectSpraysCopy.csv > > > ### Read in some data > > test01 <- read.csv(file.choose(), header=TRUE) > > Enter file name: /home/userA/InsectSpraysCopy.csv > > > ### Look at the data > > test01 > X count spray > 1 1 10 A [snipped] Note the names of the variables here. They don't match what you tried to use in your boxplot() call below. Where did you get the idea that there are "DO" and "Stream" in the "test01" data frame? Andy > ### Create a side-by-side boxplot of the data > boxplot(test01$DO ~ test01$Stream) > Error in model.frame.default(formula = test01$DO ~ test01$Stream) : > invalid type (NULL) for variable 'test01$DO' > > > I was stucked here. Pls help. TIA > > > B.R. > Stephen L > > > > ----- Original Message ---- > From: Stephen Liu <sati...@yahoo.com> > To: r-help@r-project.org > Sent: Fri, August 13, 2010 11:34:31 AM > Subject: [R] Learning ANOVA > > Hi folks, > > > File to be used is on; > data(InsectSprays) > > > I can't figure out where to insert it on following command; > test01 <- read.csv(fil.choose(), header=TRUE) > > Please help. TIA > > B.R. > > > > > ______________________________________________ > 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. > > > > > ______________________________________________ > 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. > Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates Direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. ______________________________________________ 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.