scaleCols: Scale along columns (samples)

View source: R/normalizeIntensity-functions.R

scaleColsR Documentation

Scale along columns (samples)

Description

Function to scale a matrix of intensity data along the columns (samples).

Usage

scaleCols(
  x,
  type = c("div.sum", "div.mean", "div.median", "div.mad"),
  restrict = FALSE,
  rescale = FALSE
)

Arguments

x

A matrix-like object.

type

A scaling method to use.

restrict

A logical specifying whether only features that are common to all samples are used in the calculation of scaling factors.

rescale

A logical specifying whether the normalized intensities are re-scaled by multiplying the median of normalization factors to make look similar to the original scale.

Details

Sample intensities are divided by the column sums ("div.sum"), means ("div.mean"), medians ("div.median"), or median absolute deviations ("div.mad").

Value

A matrix of the same dimension as x containing the scaled intensities.

See Also

See normalizeIntensity that provides a SummarizedExperiment-friendly wrapper for this function.

Examples


data(faahko_se)

m <- assay(faahko_se, "knn")
scaleCols(m)


HimesGroup/qmtools documentation built on April 16, 2023, 8 p.m.