spmblp: Polynomial Baseline Correction of a Matrix of Mid-infrared...

Description Usage Arguments Value Author(s) References Examples

Description

This function allows a polynomial correction of defects of the baseline of a mid-infrared spectrum.

Usage

1
spmblp(spectra, degree = 2, tol = 0.001, rep = 100)

Arguments

spectra

matrix. The matrix of FTIR spectra. The first row corresponds to wavenumber; the remaining rows corresponds to absorbances.

degree

numeric. Degree of polynomial. Defaults to 2.

tol

numeric. Tolerance of difference between iterations. Defaults to 0.001.

rep

numeric. Maximum number of iterations. Defaults to 100.

Value

An object of class spmblp, which is a list with the following components:

original

Matrix of original mid-infrared spectra.

baseline

Matrix of polynomial baseline of mid-infrared spectra.

corrected

Matrix of polynomial baseline corrected mid-infrared spectra.

Author(s)

Claudio Pozo Valenzuela [aut, cre] and Saddys Rodriguez-llamazares [aut]

References

Lieber, C. A., and Mahadevan-Jansen, A. (2003). Automated method for subtraction of fluorescence from biological Raman spectra. Applied spectroscopy, 57(11), 1363-1367.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(spData)
# Convert data frame to matrix
spectra <- as.matrix(t(spData))
# List of polynomial baseline components
mblp <- spmblp(spectra, degree = 2, tol = 0.001, rep = 100)
# Original matrix
original <- mblp$original
# Baseline matrix
baseline <- mblp$baseline
# Corrected matrix
corrected <- mblp$corrected

Example output

Loading required package: pracma

spftir documentation built on May 2, 2019, 2:08 a.m.

Related to spmblp in spftir...