I am new to R and tried to go through the commands shown at App. A of "R-intro" (p.78). I get the following error message.> fm<-1m(y~x,data=dummy)Error: unexpected symbol in "fm<-1m" I suspect it might be related to the tilda. All the commands in R-intro for the tilda show it in a superscript postion. From my keyboard I only have the option as shown above. Any help would be much appreciated. Tim -- View this message in context: http://r.789695.n4.nabble.com/Error-message-after-following-Appendix-A-R-intro-tp4678394.html Sent from the R help mailing list archive at Nabble.com.
Hi, On Oct 16, 2013, at 7:03 PM, timscharlton <tcharlton at aquafirma.com.au> wrote:> I am new to R and tried to go through the commands shown at App. A of > "R-intro" (p.78). > > I get the following error message. > >> fm<-1m(y~x,data=dummy) > Error: unexpected symbol in "fm<-1m"I think the example shows the function 'lm', which is an acronym for 'linear model', not '1m', which is an acronym 'one melon'. Cheers, Ben> > I suspect it might be related to the tilda. All the commands in R-intro for > the tilda show it in a superscript postion. From my keyboard I only have the > option as shown above. > > Any help would be much appreciated. > > Tim > > > > -- > View this message in context: http://r.789695.n4.nabble.com/Error-message-after-following-Appendix-A-R-intro-tp4678394.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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.Ben Tupper Bigelow Laboratory for Ocean Sciences 60 Bigelow Drive, P.O. Box 380 East Boothbay, Maine 04544 http://www.bigelow.org
David Winsemius
2013-Oct-17 01:22 UTC
[R] Error message after following Appendix A R-intro
On Oct 16, 2013, at 4:03 PM, timscharlton wrote:> I am new to R and tried to go through the commands shown at App. A of > "R-intro" (p.78). > > I get the following error message. > >> fm<-1m(y~x,data=dummy) > Error: unexpected symbol in "fm<-1m"In some screen fonts it's difficult to tell the difference between a "1" and an "l". You have type 1m thinking it was lm.> > I suspect it might be related to the tilda.No.> All the commands in R-intro for > the tilda show it in a superscript postion. From my keyboard I only have the > option as shown above. > > Any help would be much appreciated. > > Tim > >-- David Winsemius Alameda, CA, USA
Hello, The command you have to use is "lm", not "1m". Regards, Pascal On 17 October 2013 08:03, timscharlton <tcharlton at aquafirma.com.au> wrote:> I am new to R and tried to go through the commands shown at App. A of > "R-intro" (p.78). > > I get the following error message. > >> fm<-1m(y~x,data=dummy) > Error: unexpected symbol in "fm<-1m" > > I suspect it might be related to the tilda. All the commands in R-intro for > the tilda show it in a superscript postion. From my keyboard I only have the > option as shown above. > > Any help would be much appreciated. > > Tim > > > > -- > View this message in context: http://r.789695.n4.nabble.com/Error-message-after-following-Appendix-A-R-intro-tp4678394.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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.-- Pascal Oettli Project Scientist JAMSTEC Yokohama, Japan