R/termination.R

# 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)
  }
}
vkubicki/rfinance documentation built on May 14, 2019, 7:22 p.m.