sp_remove_offset.Rd
Convenience function to remove offset from spectroscopic data in a hyperSpec
object.
sp_remove_offset(
sp,
in_range = min ~ max,
offset = 0,
method = "not_used_yet",
at = NULL
)
hyperSpec
object.
(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
.
(number)
value of desired offset.
sp
with y-axis offset removed in (sp@data$spc
).
library(magrittr)
Spectra2 %>% plotspc()
#> Warning: Function 'plotspc' is deprecated.
#> Use function 'plot_spc' instead.
Spectra2 %>% sp_remove_offset() %>% plotspc()
#> Warning: Function 'plotspc' is deprecated.
#> Use function 'plot_spc' instead.
Spectra2 %>% sp_remove_offset(in_range = 300~400) %>% plotspc()
#> Warning: Function 'plotspc' is deprecated.
#> Use function 'plot_spc' instead.