spder: N-derived of a Mid-infrared Spectra

Description Usage Arguments Value Author(s) Examples

Description

This function allows to determine the n-derivative of a mid-infrared spectra.

Usage

1
spder(spectra, order = 2, p = 3, sw = 11)

Arguments

spectra

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

order

numeric. Order of derivative. Defaults to 2.

p

numeric. Polynomial order (p>order). Defaults to 3.

sw

numeric. Filter length (must be odd). Defaults to 11.

Value

A derivated spectra matrix. The first row corresponds to wavenumber; the second row corresponds to absorbance.

Author(s)

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

Examples

1
2
3
4
5
data(spData)
# Convert data frame to matrix
spectra <- as.matrix(t(spData))
# Derivative spectra
der <- spder(spectra=spectra, order=2, p=3, sw= 11)

Example output

Loading required package: pracma

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

Related to spder in spftir...