Shifts the spectra according to a specific method.
shift_correction(dataset, method = "constant", shift.val = 0,
interp.function = "linear", ref.limits = NULL)
list representing the dataset from a metabolomics experiment.
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"
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.
string that represents the interpolation function, can be "linear" or "spline".
vector with 2 elements that represents the reference limits to calculate the shifts.
Returns the dataset with the spectras shifted.