From 2c987d64ea2779cd132f14d761d5f423e47c2054 Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer <reinhold@kainhofer.com> Date: Wed, 8 Dec 2021 15:23:38 +0100 Subject: [PATCH] Rename local variabe to prevent misunderstandings --- R/HelperFunctions.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/HelperFunctions.R b/R/HelperFunctions.R index f813ea7..37dc73e 100644 --- a/R/HelperFunctions.R +++ b/R/HelperFunctions.R @@ -174,11 +174,11 @@ deathBenefit.annuityDecreasing = function(interest) { protectionPeriod = params$ContractData$policyPeriod - params$ContractData$deferralPeriod; vk = 1/(1 + interest); if (interest == 0) { - sumInsured = (protectionPeriod:0) / protectionPeriod + benefit = (protectionPeriod:0) / protectionPeriod } else { - sumInsured = (vk ^ (protectionPeriod:0) - 1) / (vk ^ protectionPeriod - 1) + benefit = (vk ^ (protectionPeriod:0) - 1) / (vk ^ protectionPeriod - 1) } - pad0(sumInsured, l = len) + pad0(benefit, l = len) } } -- GitLab