Dear Rui, I really appreciate your help. This is exactly what I was looking for.I know there is simpler way than mine but I couldn't figure it out.So, many many thanks.
I wonder what is the difference between This: tm[ta[i],tb[i]]= round(mean(D[(d-1)*8 + 1:8, i])) and This: (Why not use the parameter 'digits'?) tm[ta[i],tb[i]]= round(mean(D[(d-1)*8 + 1:8, i]), 1) -- View this message in context: http://r.789695.n4.nabble.com/Min-Max-tp4593065p4593159.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.