ezMedianNorm: Scales columns of a matrix to median

View source: R/util.R

ezMedianNormR Documentation

Scales columns of a matrix to median

Description

Columns of the matrix will be scaled to an overall median or to a defined target.

Usage

ezMedianNorm(x, use = NULL, target = NULL, presentFlag = NULL)

ezMedianScalingFactor(x, use = NULL, target = NULL, presentFlag = NULL)

Arguments

x

the matrix to scale.

use

a logical vector defining which rows to use.

target

a value or vector defining the median(s) by which columns should be scaled. The default will use the overall median of the matrix for each column.

presentFlag

a binary matrix with the same size as x which indicates if a values is considered as measured correctly.

Value

Returns a matrix with columns normalized to a median/medians.

Functions

  • ezMedianScalingFactor: Calculates the scaling factor for the main function.

Author(s)

Rehrauer, Hubert

Schmid, Peter

Examples

m1 = matrix(1:20, 5)
m2 = ezMedianNorm(m1)
m3 = ezMedianNorm(m1, target=10)
m4 = ezMedianNorm(m1, use=c(TRUE, FALSE))

uzh/ezRun documentation built on May 9, 2024, 6:16 p.m.