setClass(
Class = "Cashflow",
representation = representation(
maturity = "numeric",
value = "numeric"
)
)
Cashflow <- function(maturity, value) {
new(Class = "Cashflow",
maturity = maturity,
value = value)
}
IsCashflow <- function(x) is(x, "Cashflow")
setMethod(
f = "Chart",
signature = "Cashflow",
definition = function(object, ...) {
pplot(x = object@maturity,
y = object@value,
type = "h",
...)
}
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.