centerX {kerntools} | R Documentation |
Centering a squared matrix by row or column
Description
It centers a numeric matrix with dimension N x N by row (rows=TRUE) or column (rows=FALSE).
Usage
centerX(X, rows = TRUE)
Arguments
X |
Numeric matrix or data.frame of any size. |
rows |
If TRUE, the operation is done by row; otherwise, it is done by column. (Defaults: TRUE). |
Value
Centered X (class "matrix").
Examples
dat <- matrix(rnorm(25),ncol=5,nrow=5)
centerX(dat)
[Package kerntools version 1.0.2 Index]