preproc {mt}R Documentation

Pre-process Data Set

Description

Pre-process a data frame or matrix by different methods.

Usage

preproc (x, y=NULL,method="log",add=1)

preproc.sd(x, y=NULL, na.rm = FALSE)

preproc.const(x, y, tol = 1.0e-4)

Arguments

x

A numeric data frame or matrix to be pre-processed.

y

A factor specifying the group. It is only used by the method TICnorm in preproc.

method

A method used to pre-process the data set. The following methods are supported:

  • center: Centering

  • auto: Auto scaling

  • range: Range scaling

  • pareto: Pareto scaling

  • vast: Vast scaling

  • level: Level scaling

  • log: Log transformation (default)

  • log10: Log 10 transformation

  • sqrt: Square root transformation

  • asinh: Inverse hyperbolic sine transformation

  • TICnorm: TIC normalisation

na.rm

A logical value indicating whether NA values should be stripped before the computation proceeds.

add

A numeric value for addition used in the logarmath transformation log and log10.

tol

A tolerance to decide if a matrix is singular; it will reject variables and linear combinations of unit-variance variables whose variance is less than tol^2.

Details

preproc transforms data set by provided method.

preproc.sd removes variables which have (near) zero S.D with or without respect to class/grouped information.

preproc.const removes variables appears to be constant within groups / classes.

Value

A pre-processed data set.

Author(s)

Wanchang Lin

References

Berg, R., Hoefsloot, H., Westerhuis, J., Smilde, A. and Werf, M. (2006), Centering, scaling, and transformations: improving the biological information content of metabolomics data, BMC Genomics, 7:142

Examples

data(abr1)
cl   <- factor(abr1$fact$class)
dat  <- abr1$pos

## normalise data set using "TICnorm"
z.1  <- preproc(dat, y=cl, method="TICnorm")

## scale data set using "log10"
z.2 <- preproc(dat,method="log10", add=1)

## or scale data set using "log" and "TICnorm" sequentially
z.3 <- preproc(dat,method=c("log","TICnorm"), add=0.1)


[Package mt version 2.0-1.20 Index]