View source: R/ir_get_wavenumberindex.R
| ir_get_wavenumberindex | R Documentation | 
ir_get_wavenumberindex gets for a defined wavenumber value or set of
wavenumber values the corresponding indices (row number) in an object of
class ir that has been flattened with ir_flatten(). If the
specified wavenumber values do not match exactly the wavenumber values in the
ir object, the indices for the next wavenumber values will be
returned, along with a warning.
ir_get_wavenumberindex(x, wavenumber, warn = TRUE)
x | 
 A data.frame with a column x representing the x units of a spectrum
or several spectra (e.g. in the form of an object of class
  | 
wavenumber | 
 A numeric vector with wavenumber values for which to get indices.  | 
warn | 
 logical value indicating if warnings should be displayed
(  | 
An integer vector with the same length as wavenumber with the
row indices of x corresponding to the wavenumber values in wavenumber.
x_index_1090 <-
   ir::ir_sample_data |>
   ir::ir_flatten() |>
   ir::ir_get_wavenumberindex(wavenumber = 1090)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.