Learn R Programming

ChemoSpec (version 2.0-2)

normSpectra: Normalize a Spectra Object

Description

This function carries out normalization of the spectra in a Spectra object. There are currently two options, though others are readily added. "TotInt" normalizes by total intensity. In this case, the y-data of a "Spectra" object is normalized by dividing each y-value by the sum of the y-values in a given spectrum. This each spectrum sums to 1. This method assumes that the total concentration of substances giving peaks does not vary across samples which may not be true. "Range" allows one to do something similar but rather than using the sum of the entire spectrum as the denominator, only the sum of the given range is used.

Usage

normSpectra(spectra, method = "TotInt", RangeExpress = NULL)

Arguments

Value

An object of S3 class "Spectra".

References

http://academic.depauw.edu/~hanson/ChemoSpec/ChemoSpec.html

Examples

Run this code
data(CuticleIR)
res <- normSpectra(CuticleIR)
sumSpectra(res)

Run the code above in your browser using DataLab