Skip to content
Prev 32885 / 398513 Next

simple matrix question

what is the easiest way to get from
x1 x2
[1,]  2  3
[2,]  3  2
[3,]  1  3
[4,]  1  4

the matrix xbar
x1 x2
[1,] 1.75  3
[2,] 1.75  3
[3,] 1.75  3
[4,] 1.75  3

with the mean of the columns of x as values?

thanks

christoph