# NOT RUN {
spectralEx <- getSpectraInTimeExample()
plot( spectralEx )
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( baselineDefault[ timesToSelect , ] , type = "time" )
plot( baselineHighPolynomial[ timesToSelect , ] , type = "time" )
plot( baselineLowpass[ timesToSelect , ] , type = "time" )
# }
Run the code above in your browser using DataCamp Workspace