sp_normalize.Rd
Convenience function to normalize spectroscopic data in a hyperSpec
object.
sp_normalize(sp, norm = "max_I", in_range = min ~ max, at = NULL)
hyperSpec
object.
("I" | "I_max" | "I_mean" | "area" | "max" | "mean" )
a way of normalization.
(numeric
| formula
)
either a single numeric value or
a pair of values describing the range (e.g., 300~350)
of wavelengths to be used for normalization.
Default is range = min~max
.
sp
with normalized spectra in (sp@data$spc
).
library(magrittr)
Spectra2 %>% plotspc()
#> Warning: Function 'plotspc' is deprecated.
#> Use function 'plot_spc' instead.
Spectra2 %>% sp_normalize() %>% plotspc()
#> Warning: Function 'plotspc' is deprecated.
#> Use function 'plot_spc' instead.
Spectra2 %>% sp_normalize("I", 720) %>% plotspc()
#> Warning: Function 'plotspc' is deprecated.
#> Use function 'plot_spc' instead.
Spectra2 %>% sp_normalize("area") %>% plotspc()
#> Warning: Function 'plotspc' is deprecated.
#> Use function 'plot_spc' instead.
Spectra2 %>% sp_normalize("area", 300~400) %>% plotspc()
#> Warning: Function 'plotspc' is deprecated.
#> Use function 'plot_spc' instead.