mipplor
2011-Mar-23 13:31 UTC
[R] ) Error in eval(expr, envir, enclos) : object '' not found
> datafilename="E:/my documents/r/sex/bysex1.csv" > data.sex=read.table(datafilename,header=T) > data.sexy.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? -- View this message in context: http://r.789695.n4.nabble.com/Error-in-eval-expr-envir-enclos-object-not-found-tp3399503p3399503.html Sent from the R help mailing list archive at Nabble.com.
David Winsemius
2011-Mar-23 14:19 UTC
[R] ) Error in eval(expr, envir, enclos) : object '' not found
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
Jonathan P Daily
2011-Mar-23 14:23 UTC
[R] ) Error in eval(expr, envir, enclos) : object '' not found
It looks like your column name has periods in it somewhere. Is your header separated by something other than commas? look at: names(data.sex) or test by "age" %in% names(data.sex) -------------------------------------- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 "Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word... imbue it." - Jubal Early, Firefly r-help-bounces at r-project.org wrote on 03/23/2011 09:31:40 AM:> [image removed] > > [R] ) Error in eval(expr, envir, enclos) : object '' not found > > mipplor > > to: > > r-help > > 03/23/2011 10:11 AM > > Sent by: > > r-help-bounces at r-project.org > > > 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? > > > -- > View this message in context: http://r.789695.n4.nabble.com/Error- > in-eval-expr-envir-enclos-object-not-found-tp3399503p3399503.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 guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.
Maybe Matching Threads
- Error in eval(expr, envir, enclos) : numeric envir arg not of length one
- Error in eval.with.vis(expr, envir, enclos) : subscript out of bounds
- Error in eval(expr, envir, enclos) : object 'x' not found
- Error in eval(expr, envir, enclos)
- MITOOLS: Error in eval(expr, envir, enclos) : invalid 'envir' argument