powered by
Overloads arithmetic operators for spectra using `Ops.`
# S3 method for spectra Ops(e1, e2)
lhs
rhs
Depends on the operator. math operators will return spectra and logical or comparison operators will return boolean matrices
# NOT RUN { library(spectrolab) spec = as_spectra(spec_matrix_example, name_idx = 1) spec1 = spec * 2 spec2 = spec + spec all(spec1 == spec2) # }
Run the code above in your browser using DataLab