Learn R Programming

ir (version 0.4.1)

ir_get_intensity: Extracts intensities from spectra in an ir object for specific spectral channels

Description

ir_get_intensity extracts intensity values of spectra for specific user-defined spectral channels ("x axis values", e.g. wavenumber values).

Usage

ir_get_intensity(x, wavenumber, warn = TRUE)

Value

x with an additional column intensity. x$intensity is a list column with each element representing a data.frame with a row for each element in wavenumber and two columns:

x

The "x axis values" extracted with ir_get_wavenumberindex() applied on wavenumber and the corresponding spectrum in x.

y

The extracted intensity values

.

Arguments

x

An object of class ir.

wavenumber

A numeric vector with spectral channels ("x axis values", e.g. wavenumber values) for which to extract intensities.

warn

logical value indicating if warnings should be displayed (TRUE) or not (FALSE).

Examples

Run this code
x <-
   ir::ir_sample_data |>
   ir::ir_get_intensity(wavenumber = 1090)

Run the code above in your browser using DataLab