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 ArticleAnswer 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 Articleimporting 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
More Pages to Explore .....