scaleRows: Scale along rows (features)

View source: R/normalizeIntensity-functions.R

scaleRowsR Documentation

Scale along rows (features)

Description

Function to scale a matrix of intensity data along the rows (features), as described in van den Berg et al. (2006).

Usage

scaleRows(
  x,
  type = c("auto", "range", "pareto", "vast", "level", "sum", "max")
)

Arguments

x

A matrix-like object.

type

A scaling method to use.

Details

This function will do the following:

  • Auto scaling (unit variance scaling): each feature is mean-centered and divided by its standard deviation.

  • Range scaling: each feature is mean-centered and divided by its range.

  • Pareto scaling: each feature is mean-centered and divided by the square root of its standard deviation.

  • Vast scaling (variance stability scaling): it is an extension of auto scaling, using the product of standard deviation and coefficient of variation as a scale factor.

  • Level scaling: each feature is mean-centered and divided by its mean.

  • Sum scaling: each feature is divided by its sum.

  • Max scaling: each feature is divided by its maximum.

Value

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

References

van den Berg RA, Hoefsloot HC, Westerhuis JA, Smilde AK, van der Werf MJ. Centering, scaling, and transformations: improving the biological information content of metabolomics data. BMC Genomics. 2006 Jun 8;7:142. doi: 10.1186/1471-2164-7-142. PMID: 16762068; PMCID: PMC1534033.

See Also

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

Examples


data(faahko_se)

m <- assay(faahko_se, "knn")
scaleRows(m, type = "pareto")


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