View source: R/bond_to_decimal.R
bond_to_decimal | R Documentation |
This function is designed to handle all flavors of fixed income fractional price quotes and to return decimal equivalents for use in your scripts. Requires a character vector input.
bond_to_decimal(bond_px)
bond_px |
A character vector of fractional bond prices, can include decimal prices too |
Returns a vector of decimalized bond prices
# convert fractional bond prices to decimal prices
x <- c("$101-28", "101-2 1/8", "99+")
bond_to_decimal(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.