baselineCorrect | R Documentation |
generic function to perfom baseline correction
baselineCorrect(object, ...) ## S4 method for signature 'SpectraInTime' baselineCorrect(object, method = "modpolyfit", degree = 4, ...) ## S4 method for signature 'SpectraInTimeComp' baselineCorrect(object, ...)
object |
a S4 class object |
... |
other parameters passed to |
method |
method of baseline correction, default value is to |
degree |
numeric value, degree of the polynomial used only if |
SpectraInTime-class
baseline correction in the wavelength domain by linking to the baseline
spectralEx <- getSpectraInTimeExample() timeRange <- range( getTimePoints( spectralEx ) ) timesToSelect <- e( seq( timeRange[1] , timeRange[2] , length.out = 5 ) ) baselineDefault <- baselineCorrect( spectralEx ) baselineHighPolynomial <- baselineCorrect( spectralEx, method = 'modpolyfit', degree = 4 ) # filtering with fast fourier transform, not so good on example baselineLowpass <- baselineCorrect( spectralEx , method = "lowpass" ) # visual inspection plot( spectralEx ) plot( baselineDefault[ timesToSelect , ] , type = "time" ) plot( baselineHighPolynomial[ timesToSelect , ] , type = "time" ) plot( baselineLowpass[ timesToSelect , ] , type = "time" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.