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
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
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
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 an
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.