[R] ) Error in eval(expr, envir, enclos) : object '' not found

David Winsemius dwinsemius at comcast.net
Wed Mar 23 15:19:17 CET 2011


On Mar 23, 2011, at 9:31 AM, mipplor wrote:

>> datafilename="E:/my documents/r/sex/bysex1.csv"
>> data.sex=read.table(datafilename,header=T)
>> data.sex
>       y.sex.age.region.c.n
> 1   1980,F,A,N,-18.15,13.61
> 2   1980,F,A,N,-18.61,13.04
> 3   1980,F,A,N,-18.81,12.32
> 4    1990,F,A,N,-21.12,11.7
> 5   1990,F,A,N,-20.77,11.58
> 6    1990,F,A,N,-21.6,13.34
> 7    1990,F,A,N,-21.78,12.6
>
>> model.anova<-aov(c~age*sex,data=data.sex)
> Error in eval(expr, envir, enclos) : object 'age' not found
>
>
>   i just wanna do a anova test. but the error message is as above,,,
>   what should i do to shoot this problem ? Should i define the age?

You should read the help page for read.table more thoroughly with  
particular attention to the `sep` argument. At the moment you have one  
column in your data.frame.

-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list