From 159829729a136f3f89be48c9e576d31768e52d19 Mon Sep 17 00:00:00 2001 From: Kainhofer Reinhold <reinhold.kainhofer@generali.com> Date: Wed, 11 Mar 2020 11:01:03 +0100 Subject: [PATCH] Fix errors --- R/InsuranceContract.R | 3 ++- R/InsuranceParameters.R | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/R/InsuranceContract.R b/R/InsuranceContract.R index eb5b116..19b5d86 100644 --- a/R/InsuranceContract.R +++ b/R/InsuranceContract.R @@ -153,7 +153,8 @@ InsuranceContract = R6Class( params$t = t params$id = id # Override with arguments explicitly given - params[names(args)] = args[names(args)] + arguments = list(...) + params[names(arguments)] = arguments[names(arguments)] params$comment = sprintf("Dynamic increase at time %d to sum %d", t, NewSumInsured) do.call(self$addBlock, params) }, diff --git a/R/InsuranceParameters.R b/R/InsuranceParameters.R index 883686b..efe7da5 100644 --- a/R/InsuranceParameters.R +++ b/R/InsuranceParameters.R @@ -119,7 +119,7 @@ InsuranceContract.ParameterDefaults = list( ActuarialBases = list( mortalityTable = NULL, invalidityTable = NULL, - invalidityEndsContract = FALSE, # Whether a claim for disease ends the contract or not + invalidityEndsContract = TRUE, # Whether a claim for disease ends the contract or not i = 0.00, # guaranteed interest rate balanceSheetDate = as.Date("1900-12-31"), # Balance sheet date (for the calculation of the balance sheet reserves, year is irrelevant) balanceSheetMethod = "30/360", -- GitLab