ir_bin {ir} | R Documentation |
Bins infrared spectra
Description
ir_bin
bins intensity values of infrared spectra into bins of a
defined width or into a defined number of bins.
Usage
ir_bin(x, width = 10)
Arguments
x |
An object of class |
width |
An integer value indicating the wavenumber width of each
resulting bin. Must be set to |
Details
If the last bin contains fewer input values than the remaining bins, it will be dropped and a warning will be printed. If a wavenumber value exactly matches the boundary of a bin window, the respective intensity value will be assigned to both neighboring bins.
Value
An object of class ir
where spectra have been binned.
Examples
x <-
ir::ir_sample_data %>%
ir_bin(width = 50)
[Package ir version 0.2.1 Index]