View source: R/gen_coreDataManip.r
do_sgolay | R Documentation |
Performs a smoothing and / or the calculation of the m-th derivative on the given dataset using the Savitzky-Golay filter.
do_sgolay(dataset, p = 2, n = 21, m = 0, exportModel = FALSE)
dataset |
An object of class 'aquap_data" as produced by
|
p |
Numeric length one, the order of the filter. Default = 2. |
n |
Numeric length one, the filter length, must be odd. Default = 21. |
m |
Numeric length one, Return the m-th derivative of the filter coefficients. Default = 0. |
exportModel |
Logical. If a possible model should be stored in the set,
(leave at |
The underlying function is sgolayfilt
.
Returns the dataset with the NIR-data smoothed or transformed.
Other Data pre-treatment functions:
[,aquap_data-method
,
do_addNoise()
,
do_avg()
,
do_blowup()
,
do_detrend()
,
do_emsc()
,
do_gapDer()
,
do_msc()
,
do_resampleNIR()
,
dpt_modules
,
selectWls()
,
ssc()
Other dpt modules documentation:
do_detrend()
,
do_emsc()
,
do_gapDer()
,
do_msc()
,
do_snv()
,
dpt_modules
## Not run:
fd <- gfd() # get the full dataset
fd <- selectWls(fd, 1100, 1800)
fd_avg <- do_avg(fd, n=71) # apply strong smoothing
plot(fd - fd_avg, pg.where="", pg.main="| smoothed subtracted")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.