InterestRate-operators {fmbasics} | R Documentation |
InterestRate
operations
Description
A number of different operations can be performed on or with
InterestRate
objects. Methods have been defined for base
package generic operations including arithmetic and comparison.
Details
The operations are:
-
c
: concatenates a vector ofInterestRate
objects -
[
: extract parts of aInterestRate
vector -
[<-
: replace parts of aInterestRate
vector -
rep
: repeat aInterestRate
object -
length
: determines the length of aInterestRate
vector -
+, -
: addition/subtraction ofInterestRate
objects. Where twoInterestRate
objects are added/subtracted, the second is first converted to have the same compounding and day basis frequency as the first. Numeric values can be added/subtracted to/from anInterestRate
object by performing the operation directly on therate
field. Arguments are recycled as necessary. -
*
: multiplication ofInterestRate
objects. Where twoInterestRate
objects are multiplied, the second is first converted to have the same compounding and day basis frequency as the first. Numeric values can be multiplied to anInterestRate
object by performing the operation directly on therate
field. Arguments are recycled as necessary. -
/
: division ofInterestRate
objects. Where twoInterestRate
objects are divided, the second is first converted to have the same compounding and day basis frequency as the first. Numeric values can divide anInterestRate
object by performing the operation directly on therate
field. Arguments are recycled as necessary. -
<, >, <=, >=, ==, !=
: these operate in the standard way on therate
field, and if necessary, the secondInterestRate
object is converted to have the same compounding and day basis frequency as the first.