Dear all Could someone explain me why lapply(split(x,fac),mean) returns means per levels of fac for each column of x whereas lapply(split(x,fac),sum) does not return sums per level of fac and columns of x, but adds all columns together? Hence, how can I get sum to behave as mean in this instance? Thank you very much in advance E. Castella