scale_med: Centers and scales a matrix robustly for the purpose of...

Description Usage Arguments Value

View source: R/utils.R

Description

Centers each column on its median, and scales each column by its median absolute deviation (MAD). If any column MAD is zero, its values become zero and a warning is raised. If all MADs are zero, an error is raised.

Usage

1
scale_med(mat)

Arguments

mat

A numerical matrix.

Value

The input matrix centered and scaled.


muschellij2/clever documentation built on Sept. 26, 2020, 3:54 p.m.