# insurance should at least take the remaining capital as a parameter
#' insurance is reevaluated on the remaining capital
insRemCapital <- function(iniCapital, remCapital, rate) {
return(remCapital * rate)
}
#' insurance is computed only on the initial capital
insIniCapital <- function(iniCapital, remCapital, rate) {
return(iniCapital * rate)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.