| ir_subtract {ir} | R Documentation |
Subtract infrared spectra
Description
ir_subtract takes two objects of class ir, x and
y, and subtracts the intensity values of spectra in matching rows from
y from that of x. Alternatively, takes an object of class
ir, x, and a numeric value, y, and subtracts y
from all intensity values in x.
Usage
ir_subtract(x, y)
Arguments
x |
An object of class |
y |
An object of class |
Value
x where for each spectrum the respective intensity values in
y are subtracted (if y is an object of class ir), or
where for each spectrum y has been subtracted from the intensity
values.
Examples
# subtracting two objects of class ir
x1 <-
ir::ir_subtract(ir::ir_sample_data, ir::ir_sample_data)
x1 <-
ir::ir_subtract(ir::ir_sample_data, ir::ir_sample_data[1, ])
# subtracting a numeric value from an object of class `ir`.
x2 <-
ir::ir_subtract(ir::ir_sample_data, 20)
[Package ir version 0.2.1 Index]