Learn R Programming

ir (version 0.4.1)

ir_bc_polynomial: Performs baseline correction on infrared spectra using a polynomial

Description

ir_bc_polynomial performs baseline correction for infrared spectra using a polynomial. ir_bc_polynomial is an extended wrapper function for ChemoSpec::baselineSpectra().

Usage

ir_bc_polynomial(x, degree = 2, return_bl = FALSE, ...)

Value

An object of class ir with the baseline corrected spectra if returnbl = FALSE or the baselines if returnbl = TRUE.

Arguments

x

An object of class ir.

degree

An integer value representing the degree of the polynomial used for baseline correction.

return_bl

A logical value indicating if for each spectrum the baseline should be returned instead of the corrected intensity values (return_bl = TRUE) or not (return_bl = FALSE).

...

Ignored.

See Also

ir_bc()

Examples

Run this code
if(! requireNamespace("ChemoSpec", quietly = TRUE)) {
  x2 <-
     ir::ir_sample_data |>
     ir::ir_bc_polynomial(degree = 2, return_bl = FALSE)
}

Run the code above in your browser using DataLab