Learn R Programming

specmine (version 2.0.3)

savitzky_golay: Savitzky-golay transformation

Description

Smoothing and derivative of the data using Savitzky-Golay.

Usage

savitzky_golay(dataset, p.order, window, deriv = 0)

Arguments

dataset

list representing the dataset from a metabolomics experiment.

p.order

integer value representing the polynomial order.

window

odd number indicating the window size.

deriv

integer value indicating the differentiation order.

Value

Returns the dataset with the spectra smoothed using Savitzky-Golay.

Examples

Run this code
# NOT RUN {
  ## Example of smoothing the spectra from dataset with Savitzky-Golay
  data(cassavaPPD)
  dataset.smoothed = savitzky_golay(cassavaPPD, p.order = 3, window = 11, 
		     deriv = 0)
# }

Run the code above in your browser using DataLab