Hello, > > i want this: every value is subtracted by 273.15 first ,then do other > calculations(Min, Max)Can anyone tell me what is wrong.Thanks > You're subtracting 273.15 to the row numbers, not to the values in those rows. Corrected:
d.rows <- (d-1)*8 + 1:8 tm[ta[i],tb[i]]= round(10 * mean(D[d.rows, i] - 273.15)) Note that the d.rows extra variable is not really needed, it's there just for clarity. Rui Barradas -- View this message in context: http://r.789695.n4.nabble.com/Min-Max-tp4593065p4594793.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.