rla: Calculate relative log abundances 'rla' calculates the...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/functions-utils.R

Description

Calculate relative log abundances

rla calculates the relative log abundances (RLA, see reference) on a numeric vector.

rowRla calculates row-wise RLAs.

Usage

1
2
3
rla(x, group, log.transform = TRUE)

rowRla(x, group, log.transform = TRUE)

Arguments

x

numeric (for rla) or matrix (for rowRla) with the abundances (in natural scale) on which the RLA should be calculated.

group

factor, numeric or character with the same length than x that groups values in x. If omitted all values are considered to be from the same group.

log.transform

logical(1) whether x should be log2 transformed. Set to log.transform = FALSE if x is already in log scale.

Details

The RLA is defines as the (log) abundance of an analyte relative to the median across all abundances of the same group.

Value

numeric of the same length than x (for rla) or matrix with the same dimensions than x (for rowRla).

Author(s)

Johannes Rainer

References

De Livera AM, Dias DA, De Souza D, Rupasinghe T, Pyke J, Tull D, Roessner U, McConville M, Speed TP. Normalizing and integrating metabolomics data. Anal Chem 2012 Dec 18;84(24):10768-76.

Examples

1
2
3
4
5
x <- c(3, 4, 5, 1, 2, 3, 7, 8, 9)

grp <- c(1, 1, 1, 2, 2, 2, 3, 3, 3)

rla(x, grp)

yclement/xcms documentation built on April 10, 2020, 12:08 a.m.