Learn R Programming

fixedincome (version 0.0.5)

as.term: Coerce a character to a Term

Description

as.term coerces a character vector to a Term object.

Usage

as.term(x, ...)

Value

A Term object created from a string.

Arguments

x

a character to be coerced to a Term.

...

additional arguments. Currently unused.

Details

The string representation of the Term class follows the layout:

NUMBER UNITS

where units is one of: days, months, years.

Examples

Run this code
t <- as.term("6 months")

Run the code above in your browser using DataLab