batch.shift {qcrlscR}R Documentation

Batch shifting

Description

Remove batch effect withing each block.

Usage

batch.shift(x, y, method = "mean", overall_average = TRUE)

Arguments

x

a data matrix.

y

a categorical data for batch/block information.

method

method for shifting.

overall_average

a logical value to indicate whether or not an overall average will be added after shifting.

Value

a shifted data matrix.

References

Silvia Wagner, et.al, Tools in Metabonomics: An Integrated Validation Approach for LC-MS Metabolic Profiling of Mercapturic Acids in Human Urine Anal. Chem., 2007, 79 (7), pp 2918-2926, DOI: 10.1021/ac062153w

Examples

names(man_qc)
data <- man_qc$data
meta <- man_qc$meta
## batch shifting
cls.bl <- factor(meta$batch)
res <- batch.shift(data, cls.bl, overall_average = TRUE)

[Package qcrlscR version 0.1.3 Index]