sp_filter | R Documentation |
Function first applies median and then Savitzky-Golay smoothing filters for each spectroscopic curve individually.
sp_filter(sp, k = 3, n = 25, p = 9)
sp |
hyperSpec object |
k |
Window for a median filter. If k = 0, median filter is not applied. |
n |
filter length (must be odd) for a Savitzky-Golay (SG)smoothing filter. If n = 0, SG filter is not applied. |
p |
filter order for a Savitzky-Golay smoothing filter |
library(spHelper)
library(hyperSpec)
Original
Spectra2[1] %>% plotspc()
# Filtered
Spectra2[1] %>% sp_filter() %>% plotspc()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.