Learn R Programming

fixedincome (version 0.0.5)

term-conversion: Convert Term in different units

Description

toyears, tomonths and todays functions convert Term objects according to Daycount.

Usage

toyears(x, t)

tomonths(x, t)

todays(x, t)

Value

A Term object converted to the units accordingly the used function.

Arguments

x

a Daycount object.

t

a Term object.

Details

toyears returns the given Term in years units. tomonths returns the given Term in months units. todays returns the given Term in days units.

Examples

Run this code
dc <- daycount("actual/360")
t <- term(10, "months")
toyears(dc, t)
tomonths(dc, t)
todays(dc, t)

Run the code above in your browser using DataLab