The function is lm(), not 1m(). lm stands for "linear model" (the first letter of each word)
On Tue, Aug 6, 2024 at 11:22 AM Rosana Curzel <rcur...@gmail.com> wrote: > Dear all, > > I am introducing in R and I had a problem in the beginning. Please, you can > see an error message below: (Maybe I am in error. If so, sorry for that). > Thank You so much! > > [1] "R" > > x<-rnorm(50) > > y<-rnorm(x) > > plot(x,y) > > ls() > [1] "x" "y" > > rm(x,y) > > x<-1:20 Make x=(1,2,...,20). > Erro: unexpected symbol em "x<-1:20 Make" > > x<-1:20 > > w<-1+sqrt(x)/2 > > dummy<-data.frame(x=x, y=x+rnorm(x)*w) > > dummy > x y > 1 1 1.5870188 > 2 2 -0.1337255 > 3 3 2.1804598 > 4 4 5.9208727 > 5 5 4.8860564 > 6 6 6.5736696 > 7 7 5.5894932 > 8 8 5.1181831 > 9 9 12.2127547 > 10 10 11.2671459 > 11 11 10.6736019 > 12 12 9.5145623 > 13 13 9.7410161 > 14 14 11.4136781 > 15 15 14.6617839 > 16 16 16.0676884 > 17 17 13.0879981 > 18 18 17.4291520 > 19 19 22.3425584 > 20 20 23.2160390 > > fm<-1m(y~x,data=dummy) > Erro: unexpected symbol em "fm<-1m" > > fm<- 1m(y~x,data=dummy) > Erro: unexpected symbol em "fm<- 1m" > > fm<-1m(y ~ x, data=dummy) > Erro: unexpected symbol em "fm<-1m" > > fm<-1m(y~x,data=dummy) > Erro: unexpected symbol em "fm<-1m" > > fm<-1m(y~x,data=dummy) > Erro: unexpected symbol em "fm<-1m" > > > > > > -- > Rosana Curzel > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.