Center a matrix row-wise

rowcenter(m, by = "mean")

Arguments

m

a matrix or Matrix

by

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

Value

row-centered matrix