Description Usage Arguments Value Examples
View source: R/credit-methods.R
You can coerce objects to the ZeroHazardRate
class using this method.
1 2 3 4 5 6 7 8 9 | as_ZeroHazardRate(x, ...)
## S3 method for class 'SurvivalProbabilities'
as_ZeroHazardRate(x, compounding,
day_basis, ...)
## S3 method for class 'ZeroHazardRate'
as_ZeroHazardRate(x, compounding = NULL,
day_basis = NULL, ...)
|
x |
object to coerce |
... |
other parameters passed to methods |
compounding |
a numeric vector representing the compounding frequency. |
day_basis |
a character vector representing the day basis associated
with the interest rate and hazard rate(see |
an ZeroHazardRate
object
1 2 3 | library("lubridate")
as_ZeroHazardRate(SurvivalProbabilities(0.95, ymd(20130101), ymd(20140101), CDSSpec("Empty")),
compounding = 2, day_basis = "act/365")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.