centerX: Centering a squared matrix by row or column

View source: R/normalization.R

centerXR 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)

kerntools documentation built on Jan. 29, 2026, 1:07 a.m.