Center a matrix column-wise

colcenter(m, by = "mean")

Arguments

m

a matrix or Matrix

by

either "mean", "median" or a numeric vector of length equal to the number of columns of ‘m’. Default: "mean"

Value

column-centered matrix