View source: R/math_operator_overloads.R
Ops.spectra | R Documentation |
Overloads arithmetic operators for spectra using 'Ops.'
## S3 method for class 'spectra' Ops(e1, e2)
e1 |
lhs |
e2 |
rhs |
Depends on the operator. math operators will return spectra and logical or comparison operators will return boolean matrices
Jose Eduardo Meireles
library(spectrolab) spec = as_spectra(spec_matrix_example, name_idx = 1) spec1 = spec * 2 spec2 = spec + spec all(spec1 == spec2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.