calculate the mean for each column of a matrix in R calculate the mean for each column of a matrix in R r r