Center a matrix column-wise
colCenter(m, method = "mean", centerBy = NULL)
m | a matrix |
---|---|
method | a character string. one of "mean" or "median" definining how to do the centering. Default: "mean" |
centerBy | a numeric vector of length equal to ncol(m) of values to be subtracted from each row. |
a matrix centered by columns such that the statistic defined in method is equal to 0 for each column.