Interpolates selected regions in infrared spectra in an ir
object
Source: R/ir_interpolate_region.R
ir_interpolate_region.Rd
ir_interpolate_region
linearly interpolates a user-defined region in
infrared spectra.
Arguments
- x
An object of class
ir
.- range
A
data.frame
with a row for each region to interpolate linearly and two columns:- start
A numeric vector with start values for regions to interpolate linearly (x axis values).
- end
A numeric vector with end values for regions to interpolate linearly (x axis values).
For each row in
range
, the values inrange$start
have to be smaller than the values inrange$end
.
Examples
# interpolation range
range <- data.frame(start = 1000, end = 1500)
# do the interpolation
x <-
ir::ir_sample_data %>%
ir::ir_interpolate_region(range = range)