smooth | R Documentation |
smoothing is applied along the spectral axis, not the time axis
smooth(object, ...) ## S4 method for signature 'SpectraInTime' smooth( object, method = "sg", order = 3, window = order + 7 - order%%2, derivative = 0, dim = "spectralAxis" ) ## S4 method for signature 'SpectraInTimeComp' smooth(object, ...)
object |
a S4 class object |
... |
additional parameters |
method |
character vector smoothing method, options are 'sg' (= default, Savitsky-Golay filter) or 'mean'. |
order |
numeric value, order of the polynomial used to interpolate (only used when |
window |
width of the smoothing default value slightly higher than in the signal package, the user might consider a large value, otherwise smoothing has little effect |
derivative |
derivative to be taken (only used when |
dim |
character string, specifying along which dimension smoothing should be applied. Options are "spectralAxis" (= default) or "time" |
SpectraInTime-class
equal distances between wavelenght intervals are assumed
spectralEx <- getSpectraInTimeExample() smoothDefault <- smooth( spectralEx ) timeRange <- range( getTimePoints( spectralEx )) timesToSelect <- e( seq( timeRange[1] , timeRange[2] , length.out = 5 ) ) smoothALot <- smooth( spectralEx , order = 2 , window = 301 ) derivative1 <- smooth( spectralEx , derivative = 1 ) derivative2 <- smooth( spectralEx , derivative = 2 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.