shift_correction: Shift correction

Description Usage Arguments Value

Description

Shifts the spectra according to a specific method.

Usage

1
2
shift_correction(dataset, method = "constant", shift.val = 0, 
interp.function = "linear", ref.limits = NULL)

Arguments

dataset

list representing the dataset from a metabolomics experiment.

method

string that indicates the shifting method. It can be:

  • "constant" uses a constant shift that is added to the x-values

  • "interpolation" uses interpolation according to "interp.function"

shift.val

value of the shift (for constant and interpolation methods); can be a single value for all spectra, can be the string "auto", the shifts are automatically determined or a vector with the size of the number of samples with the shifts for each spectra.

interp.function

string that represents the interpolation function, can be "linear" or "spline".

ref.limits

vector with 2 elements that represents the reference limits to calculate the shifts.

Value

Returns the dataset with the spectras shifted.


specmine documentation built on Sept. 21, 2021, 5:06 p.m.