batch.shift: Batch shifting

View source: R/qcrlscR.R

batch.shiftR 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)

qcrlscR documentation built on June 8, 2025, 11:21 a.m.