sp_filter.Rd
Function first applies median and then Savitzky-Golay smoothing filters for each spectroscopic curve individually.
sp_filter(sp, k = 3, n = 25, p = 9)
hyperSpec object
Window for a median filter. If k = 0, median filter is not applied.
filter length (must be odd) for a Savitzky-Golay (SG)smoothing filter. If n = 0, SG filter is not applied.
filter order for a Savitzky-Golay smoothing filter
library(spHelper)
library(hyperSpec)
Original
#> Error in eval(expr, envir, enclos): object 'Original' not found
Spectra2[1] %>% plotspc()
#> Warning: Function 'plotspc' is deprecated.
#> Use function 'plot_spc' instead.
# Filtered
Spectra2[1] %>% sp_filter() %>% plotspc()
#> Warning: Function 'plotspc' is deprecated.
#> Use function 'plot_spc' instead.