[R] R Help finding Mean

B77S bps0002 at auburn.edu
Thu Sep 1 15:55:52 CEST 2011


see ?mean
Then avoid other peoples code. 


cenae27 wrote:
> 
> bob<-read.csv('shi.csv', header=T)
> 
> newmean<-matrix(0, test, dim(bob)[2]-6);a<-0; for (i in
> c(4,8:(dim(bob)[2])))
> {a<-a+1;newmean[,a]<-tapply(bob[,i], bob$Exam, mean)}
> colnames(newmean)<-colnames(bob)[c(4,8:(dim(bob)[2]))]
> 
> Could anyone please help me what does the above code does ... I want to
> find mean ... but would like to know what exactly is the above code doing.
> 
> Thanks for your help.
> Cenae
> 

--
View this message in context: http://r.789695.n4.nabble.com/R-Help-finding-Mean-tp3783400p3783652.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list