View source: R/normalizeIntensity-functions.R
scaleRows | R Documentation |
Function to scale a matrix of intensity data along the rows (features), as described in van den Berg et al. (2006).
scaleRows(
x,
type = c("auto", "range", "pareto", "vast", "level", "sum", "max")
)
x |
A matrix-like object. |
type |
A scaling method to use. |
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.
A matrix of the same dimension as x
containing the scaled
intensities.
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 normalizeIntensity that provides a SummarizedExperiment-friendly wrapper for this function.
data(faahko_se)
m <- assay(faahko_se, "knn")
scaleRows(m, type = "pareto")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.