Learn R Programming

specmine (version 1.0)

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)

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.

Value

Returns the dataset with the spectra smoothed.

Examples

Run this code
  ## Example of smoothing the spectra from dataset
  data(cassavaPPD)
  dataset.smoothed = smoothing_interpolation(cassavaPPD, method = "bin", 
		     reducing.factor = 2)

Run the code above in your browser using DataLab