
Hi,

I have a matrix:

mymat <- matrix(runif(10*4), ncol=4)

I wish to subtract the column means, down the colums, subtract the row means from the rows and add back the grand mean - all the means should be the means of mymat rather than of the new matrix. 

How can I do this?

Any help much appreciated.

Thanks

Tom

_________________________________________________________________


	[[alternative HTML version deleted]]


