| 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 ofInterestRateobjects -
[: extract parts of aInterestRatevector -
[<-: replace parts of aInterestRatevector -
rep: repeat aInterestRateobject -
length: determines the length of aInterestRatevector -
+, -: addition/subtraction ofInterestRateobjects. Where twoInterestRateobjects 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 anInterestRateobject by performing the operation directly on theratefield. Arguments are recycled as necessary. -
*: multiplication ofInterestRateobjects. Where twoInterestRateobjects 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 anInterestRateobject by performing the operation directly on theratefield. Arguments are recycled as necessary. -
/: division ofInterestRateobjects. Where twoInterestRateobjects are divided, the second is first converted to have the same compounding and day basis frequency as the first. Numeric values can divide anInterestRateobject by performing the operation directly on theratefield. Arguments are recycled as necessary. -
<, >, <=, >=, ==, !=: these operate in the standard way on theratefield, and if necessary, the secondInterestRateobject is converted to have the same compounding and day basis frequency as the first.