Ops.ir {ir}R Documentation

Arithmetic operations for ir objects

Description

Arithmetic operations for ir objects

Usage

## S3 method for class 'ir'
Ops(e1, e2)

Arguments

e1

An object of class ir.

e2

An object of class ir or a numeric value.

Value

e1 with intensity values of the spectra added to/subtracted with/multiplied with/divided by those in e2:

Examples

## 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


[Package ir version 0.2.1 Index]