batchAdj: linear model adjustment for batch

Description Usage Arguments Value

Description

linear modelling of a peak table adjusting for batch lm. i.e. peakTable ~ batchEff. Residuals are used as normalization factors for each variable variable.

Usage

1
batchAdj(peakTable = NULL, obsNames = NULL, batchEff = NULL)

Arguments

peakTable

either a data.frame, full file path as a character string to a .csv file of a peak table in the form observation (samples) in columns and variables (Mass spectral signals) in rows. If argument is not supplied a GUI file selection window will open and a .csv file can be selected.

obsNames

character vector (i.e. sample/ QC/ Blank) names to identify appropriate observation (sample) columns.

batchEff

a vector or matrix/ data.frame of co-variates implicated in batch membership. If a matrix/data.frame is supplied the linear model will be constructed with two or more fixed effects. (i.e. in the form peakTable ~ batchEff1 + batchEff2). Categorical variables (e.g. batch 1 and batch 2) must be encoded as factors and continuous variables encoded as numeric for the batch adjustment to work properly.

...

additional variables to lm. will be added to

Value

a list containing 1. a data frame identical to peakTable with variables adjusted for batch effect. 2. a matrix of the linear model residuals.


WMBEdmands/MetMSLine documentation built on May 9, 2019, 10:03 p.m.