convertSpectra: Converts spectra into new units.

Description Usage Arguments Value Author(s) Examples

View source: R/convertSpectra.R

Description

This function accepts spectra in a single spectra.list or spectra.matrix object performs a specified units conversion. Conversion between wavelengths and wave numbers are reliable. However, conversions among transmittance, absorbance, and reflectance are naive estimations (inverse log10 transformations) provided for convenience.

Usage

1
convertSpectra(x, method = NULL)

Arguments

x

An object of class spectra.list or spectra.matrix.

method

The desired conversion. Selected from:
"A_to_TR" - Absorbance to Transmittance.
"TR_to_A" - Transmittance to Absorbance.
"A_to_TR" - Absorbance to Transmittance.
"TR_to_A" - Transmittance to Absorbance.
"WN_to_WL" - Wavenumbers to Wavelength.
"WL_to_WN" - Wavelength to Wavenumbers.

Value

A spectra.matrix containing the converted spectra.

Author(s)

Daniel M Griffith

Examples

1
2
3
4
5
6
## Not run: 
data(shootout)
attributes(shootout_scans)
converted_scans <- convertSpectra(x = shootout_scans, method = "WL_to_WN")

## End(Not run)

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