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)
Value
An object of class ir where spectra have been binned.
Arguments
x
An object of class ir with integer wavenumber
values increasing by 1.
width
An integer value indicating the wavenumber width of each
resulting bin. Must be set to NULL if n is specified.
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.