[R] about lm

Rui Barradas ruipbarradas at sapo.pt
Fri Nov 16 20:50:09 CET 2012


Hello,

1. Don't call your dataset 'data', it's the name of an R function.
2. Imagine it's called 'dat'. Then you must use the lm() argument data = 
dat. Like this:

lm(ve~ su, data = dat)


Hope this helps,

Rui Barradas
Em 16-11-2012 19:42, Sonia Amin escreveu:
> Dear friends,
> I have a csv file entitled ven.csv located in C:\\, this file contains only
> two columns:"ve" and "su" I have written the following lines:
>   data=read.csv("c:\\ven.csv",header=TRUE,sep=";");
>
>   lm(ve~ su)
> I have obtained the following message:
>
> Error in eval(expr, envir, enclos) : object 've' does not exist. What's the
> problem? thank you for your help in advance
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> 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.




More information about the R-help mailing list