Code:

```
rm(list=ls())
set.seed(12345)
my.mat <- matrix(rnorm(120,0,0.5),nrow=6,byrow=TRUE)
rownames(my.mat) <- paste("s",1:6,sep="")
colnames(my.mat) <- paste("g",1:20,sep="")
dim(my.mat)
# 6 20#six rows 20 columns
z.mat <- apply(my.mat, MARGIN = 1, FUN = scale )
dim(z.mat)
#20 6 # The matrix gets transposed##!!!!
```

Thanks