Learn R Programming

spftir (version 0.1.0)

spoffs: Offset Correction of a Matrix of Mid-infrared Spectra

Description

Allows the removal of the background of a matrix of mid-infrared spectra.

Usage

spoffs(spectra)

Arguments

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

Value

A matrix spectra with with background values deleted. 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))
# Offset correction
offs <- spoffs(spectra=spectra)

Run the code above in your browser using DataLab