Learn R Programming

qcrlscR (version 0.1.3)

batch.shift: Batch shifting

Description

Remove batch effect withing each block.

Usage

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

Value

a shifted data matrix.

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.

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

Run this code
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)

Run the code above in your browser using DataLab