Ops.ir | R Documentation |
ir
objectsArithmetic operations for ir
objects
## S3 method for class 'ir' Ops(e1, e2)
e1 |
An object of class |
e2 |
An object of class |
e1
with intensity values of the spectra added to/subtracted
with/multiplied with/divided by those in e2
:
If e2
is a numeric value, all intensity values in the spectra of e1
are
added/subtracted/multiplied/divided by e2
.
If e2
is an ir
object with one row, it is replicated (see rep.ir) so
that the row numbers match to those of e1
and intensity values are
added/subtracted/multiplied/divided row-wise.
If e2
is an ir
object with the same number of rows as e1
, intensity
values are added/subtracted/multiplied/divided row-wise.
## addition ir::ir_sample_data + ir::ir_sample_data ir::ir_sample_data + 2 ## subtraction ir::ir_sample_data - ir::ir_sample_data ir::ir_sample_data - 2 ## multiplication ir::ir_sample_data * ir::ir_sample_data ir::ir_sample_data * 2 ## division ir::ir_sample_data / ir::ir_sample_data ir::ir_sample_data / 2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.