# termination functions are called at each term to check wether the computation
# should continue or not
#' End is there are no months left
termOnMonth <- function (remMonth, # number of remaining years
capLoan) # remaining capital
{
if (remMonth == 0)
{
return(T)
}
else
{
return(F)
}
}
#' End loan when there is no more capital to pay back
termOnCapLoan <- function (remMonth, # number of remaining years
capLoan) # remaining capital
{
if (capLoan <= 0)
{
return(T)
}
else
{
return(F)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.