sp_remove_offset: Remove offset

View source: R/sp_remove_offset.R

sp_remove_offsetR Documentation

Remove offset

Description

Convenience function to remove offset from spectroscopic data in a hyperSpec object.

Usage

sp_remove_offset(
  sp,
  in_range = min ~ max,
  offset = 0,
  method = "not_used_yet",
  at = NULL
)

Arguments

sp

hyperSpec object.

in_range, at

(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.

offset

(number)
value of desired offset.

Value

sp with y-axis offset removed in (sp@data$spc).

Examples


library(magrittr)

Spectra2 %>% plotspc()

Spectra2 %>% sp_remove_offset() %>% plotspc()

Spectra2 %>% sp_remove_offset(in_range = 300~400) %>% plotspc()

GegznaV/spHelper documentation built on April 16, 2023, 1:42 p.m.