Skip to contents

robust_scale

Usage

robust_scale(
  input.matrix,
  MARGIN = 1,
  center = TRUE,
  scale = TRUE,
  preserveScale = TRUE
)

Arguments

input.matrix

A matrix

MARGIN

Whether to apply the function within each biomarker (1) or across all biomarkers in each cell (2).

center

Subtract median

scale

Scale by MAD

preserveScale

Equalize scales but keep magnitude more similar to the raw data. Divides MADs by the mean of the MADs before scaling, so the magnitude of the resulting IQRs is more like the mean MAD rather than (-1, 1). Doesn't do anything unless scale = TRUE since this just augments scaling.

Value

A scaled matrix

Scroll to top