Learn R Programming

spftir (version 0.1.0)

spint: Interpolation for Intermediate Values of a Matrix of Mid-infrared Spectra

Description

Allow the interpolation of intermediate values of a matrix of mid-infrared spectra.

Usage

spint(spectra, n = 1)

Arguments

spectra
matrix. The matrix of FTIR spectra. The first row corresponds to wavenumber; the remaining rows corresponds to absorbances.
n
numeric. Number of interpolated values between two variables. Defaults to 1.

Value

A matrix spectra with interpolated values. 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))
# Interpolated spectra
int <- spint(spectra=spectra, n=1)

Run the code above in your browser using DataLab