Learn R Programming

spectralAnalysis (version 4.3.3)

scatterCorrect: perform multiplicative scatter correction

Description

perform multiplicative scatter correction

Usage

scatterCorrect(object, ...)

# S4 method for SpectraInTime scatterCorrect(object, referenceSpectra = NULL, referenceMethod = "mean")

Value

new S4 object with spectra scatter corrected

SpectraInTime-class

Arguments

object

a S4 class object such as SpectraInTime-class

...

for internal method consistency

referenceSpectra

the reference spectra when not derived from the current data, defaults to NULL when referenceMethod is used to derive the reference spectra from the data

referenceMethod

name of the function used to derive the spectra over the data measurements, defaults to "mean" when the average spectra in the object is used

Author

Adriaan Blommaert

Details

multiplicative scatter correction consist of fitting regressing each spectra against the reference spectra and using the coefficients of this regression model to correct for multiplicative light scatter by substracting the intercept and dividing by the slope

Examples

Run this code

 object1   <-  getSpectraInTimeExample()
 object2   <-  scatterCorrect( object1 )
 # \donttest{
   plot( object1 )
   plot( object2 )
# }

Run the code above in your browser using DataLab