Learn R Programming

spftir (version 0.1.0)

spnormw: Normalizes the Absorbance of a Matrix of Mid-infrared Spectra by a Specific Band

Description

The absorbance values of the matrix of mid-infrared spectra is normalized by a specific band.

Usage

spnormw(spectra, wn)

Arguments

spectra
matrix. The matrix of FTIR spectra. The first row corresponds to wavenumber; the remaining rows corresponds to absorbances.
wn
numeric. Specific band (wavenumber) used to normalize the spectra.

Value

A matrix spectra normalized by a specific band. The first row corresponds to wavenumber; the remaining rows corresponds to absorbances.

Examples

Run this code
data(spData)
# Convert data frame to matrix
spectra <- as.matrix(t(spData))
# Normalized spectra by a specific band
normw <- spnormw(spectra=spectra, wn=1510)

Run the code above in your browser using DataLab