Quantcast
Channel: importing file into R program? - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by MieAn100 for importing file into R program?

data<-read.table("stalkeyedflies.txt", header=T)datacorn<-data[data$Treatment=="corn",]# get the subset of cornmean(corn[,"eye.span"])# calculate the mean of...

View Article



Answer by agstudy for importing file into R program?

You should subset by column. For example:mean(subset(dat,Treatment=='corn')$eye)[1] 2.14> mean(subset(dat,Treatment=='cotton')$eye)[1] 2.066667Or better here you should use tapply to apply the mean...

View Article

importing file into R program?

I just starting using the R program and was having some trouble figuring out what is wrong with my program. I imported a file into my R program and I keep getting the error 'object 'corn' not found'...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images