Learn R Programming

specmine (version 3.1.6)

smoothing_interpolation: Smoothing interpolation

Description

Performs smoothing interpolation according to a specific method.

Usage

smoothing_interpolation(dataset, method = "bin", 
reducing.factor = 2, x.axis = NULL, p.order = 3, 
window = 11, deriv = 0, na.rm = TRUE)

Arguments

dataset

list representing the dataset from a metabolomics experiment.

method

string specifying the smoothing method. The three possible methods are: "bin", "loess" and "savitzky.golay".

reducing.factor

numeric value indicating the reducing factor for bin method.

x.axis

numeric vector representing the new x-axis for loess method.

p.order

numeric value representing the polynomial order for savitzky-golay method.

window

numeric value indicating the size of the window for savitzky-golay method. (must be an odd number)

deriv

numeric value indicating the differentiation order for savitzky-golay method.

na.rm

boolean value indicating if NAs should be removed. Defaults to TRUE.

Value

Returns the dataset with the spectra smoothed.