Re: [R] An error message with the command fm<-1m (Version 4.4.1. p. 80, An introduction to R)

2024-08-06 Thread Bert Gunter
Rosana: As you say you are just beginning in R, it is probably worth adding that you should first take some time to learn basic R rules, one of which is that "legal" (i.e. syntactically valid) names in R cannot start with a number. See ?make.names for a brief discussion or an R tutorial -- as usua

Re: [R] An error message with the command fm<-1m

2024-08-06 Thread Jorgen Harmse via R-help
> The function is lm(), not 1m(). Eric Berger is correct (except for the extra parentheses), but it is worth pointing out that variable names do not begin with digits. (You can use backticks, assign, & other features to create such names (e.g. to write the Orwellian assignment `2 + 2` <- 5L), b

Re: [R] An error message with the command fm<-1m (Version 4.4.1. p. 80, An introduction to R)

2024-08-06 Thread Eric Berger
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 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

[R] An error message with the command fm<-1m (Version 4.4.1. p. 80, An introduction to R)

2024-08-06 Thread Rosana Curzel
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: une