preProcess {TIMP}R Documentation

Performs preprocessing on data stored as an objects of class dat.

Description

Performs data sampling, selection, baseline correction, scaling, and data correction on an object of class dat.

Usage

preProcess(data, sample = 1, sample_time = 1, sample_lambda = 1, 
    sel_time = vector(), sel_lambda = vector(), baselinetime = vector(), 
    baselinelambda = vector(), scalx = NULL, scalx2 = NULL, 
    sel_lambda_ab = vector(), sel_time_ab = vector(), rm_x2=vector(), 
    rm_x = vector(), svdResid = list(), numV = 0)

Arguments

data Object of class dat
sample integer describing sampling interval to take in both time and x2; e.g., sample=2 will sample every 2nd time and every 2nd point in x2.
sample_time integer describing sampling interval in time; e.g., sample_time=2 will sample every 2nd element of the time vector.
sample_lambda integer describing sampling interval in x2; e.g., sample_lambda=2 will sample every 2nd element in the x2 vector.
sel_time vector of length 2 describing the first and last time index of data to select; e.g., sel_time=c(5,120) will select data at times indexed 5-120.
sel_lambda vector of length 2 describing the first and last x2 index of data to select; e.g., sel_lambda=c(5,120) will select data at x2 indexed 5-120.
baselinetime a vector of form c(timeIndexmin, timeIndexmax, lambdaIndexmin, lambdaIndexmax). The average of data between x2 indexes lambdaIndexmin and lambdaIndexmax is subtracted from data with time index between timeIndexmin and timeIndexmax.
baselinelambda a vector of form c(timeIndexmin, timeIndexmax, lambdaIndexmin, lambdaIndexmax). The average of data between time indexes timeIndexmin and timeIndexmax is subtracted from data with x2 index between lambdaIndexmin and lambdaIndexmax.
scalx numeric by which to linearly scale the x axis (which often represents time), so that newx = oldx * scalx
scalx2 vector of length 2 by which to linearly scale the x2 axis, so that newx2 = oldx2 * scalx2[1] + scalx2[2]
sel_lambda_ab vector of length 2 describing the absolute values (e.g., wavelengths, wavenumbers, etc.) between which data should be selected. e.g., sel_lambda_ab = c(400, 600) will select data associated with x2 values between 400 and 600.
sel_time_ab vector of length 2 describing the absolute times between which data should be selected. e.g., sel_time_ab = c(50, 5000) will select data associated with time values between 50 and 5000 picoseconds.
rm_x2 vector of x2 indices to remove from the data
rm_x vector of x indices to remove from the data
svdResid list returned from the getResid function, containing residuals to be used in data correction.
numV numeric specifying how many singular vectors to use in data correction. Maximum is five.

Value

object of class dat.

Author(s)

Katharine M. Mullen, Ivo H. M. van Stokkum

See Also

readData, getResid


[Package TIMP version 1.3 Index]