Arith-methods: Arithmetic operators for FLCore classes

Arith,numeric,FLArray-methodR Documentation

Arithmetic operators for FLCore classes

Description

Overloaded arithmetic operators for FLCore classes

Usage

## S4 method for signature 'numeric,FLArray'
Arith(e1, e2)

## S4 method for signature 'FLArray,numeric'
Arith(e1, e2)

## S4 method for signature 'FLArray,FLArray'
Arith(e1, e2)

## S4 method for signature 'FLPar,FLPar'
Arith(e1, e2)

## S4 method for signature 'FLArray,FLPar'
Arith(e1, e2)

## S4 method for signature 'FLPar,FLArray'
Arith(e1, e2)

Details

These methods apply the standard arithmetic operators included in the Arith group ("+", "-", "*", "^", "%%", "%/%", and "/"), so that they return an object of the appropriate class.

When the operation involves objects of two classes (e.g. FLPar and FLQuant), the class is the returned object is that of the more complexs object, in this case FLQuant.

Author(s)

The FLR Team

See Also

methods::Arith base::Arithmetic

Examples


flq <- FLQuant(rlnorm(90), dim=c(3,10), units='kg')
flp <- FLPar(a=99)

# FLQuant and numeric
flq * 25
# Two FLQuant objects
flq + flq

# FLQuant and FLPar
flq / flp

flr/FLCore documentation built on May 4, 2024, midnight