View source: R/rating_to_char.R
rating_to_char | R Documentation |
This function takes a vector of numeric credit ratings and returns a vector of their character equivalents. The package currently supports long term credit ratings from Moody's, S&P, Fitch, Kroll, & DBRS/Morningstar and defaults to return the S/F/K rating values for character equivalents. All mappings are stored in creditor:::cr_imp. Short term ratings are assigned the floor rounded value of their long term equivalents.
rating_to_char(numeric_rating, agency_convention = "sfk")
numeric_rating |
A numeric vector of bond credit ratings |
agency_convention |
Defaults to "sfk" (e.g. BBB+), but can be "m" (e.g. Baa1) |
Returns a vector of numeric credit rating equivalents.
# convert bond credit ratings to numeric values
x <- c(1, 2, 4)
rating_to_char(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.