makeCompatible: Manipulate a spectral dataset to conform to the units,...

Description Usage Arguments Value Author(s) Examples

View source: R/makeCompatible.R

Description

This function accepts spectra as a spectra.list or spectra.matrix object, and manipulates these spectra to conform to the units, resolution, and extent of a reference dataset. The transformations occur in the following order: - Conversion between wavelength and wavenumber with convertSpectra(). - Conversion among absorbance, reflectance, transmittance values with convertSpectra(). - Resampling of spectra is done with approx(), which performs a linear interpolation.

Usage

1

Arguments

x

An object of class spectra.list or spectra.matrix containing the spectra to modify.

ref

An object of class spectra.list or spectra.matrix have the attributes (units, resolution, etc.) desired for x.

Value

Returns an object of class spectra.matrix containing the modified spectra.

Author(s)

Daniel M Griffith

Examples

1
2
3
4
5
6
7
## Not run: 
data(shootout)
reference <- convertSpectra(x = shootout_scans, method = "WL_to_WN")
reference <- reference[,1:100] 
makeCompatible(x = shootout_scans, ref = reference)

## End(Not run)

griffithdan/plantspec documentation built on May 17, 2019, 8:37 a.m.