From d7d6456bd6d8451374a89945da17b44e6d5efdb3 Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer <reinhold@kainhofer.com> Date: Tue, 8 Sep 2020 22:47:40 +0200 Subject: [PATCH] Fix release issues --- DESCRIPTION | 7 ++++--- R/HelperFunctions.R | 2 +- R/InsuranceContract.R | 2 +- README.md | 10 ++++++++-- man/InsuranceContract.Rd | 2 +- vignettes/using-the-lifeinsurancecontracts-package.Rmd | 2 +- 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e24c7d1..c8c311e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,8 +2,8 @@ Package: LifeInsuranceContracts Type: Package Version: 0.0.1 Date: 2020-09-04 -Title: A framework for general, traditional life insurance contracts, including profit - participation and contract changes +Title: A Framework for General, Traditional Life Insurance Contracts, Including Profit + Participation and Contract Changes Description: R6 classes to model traditional life insurance contracts like annuities, whole life insurances or endowments. All relevant quantities like premium decomposition, reserves and benefits over the whole @@ -19,9 +19,9 @@ Imports: objectProperties, lubridate, openxlsx, - abind, dplyr, scales, + abind, stringr, methods, rlang @@ -51,3 +51,4 @@ VignetteBuilder: knitr Roxygen: list(markdown = TRUE) URL: https://gitlab.open-tools.net/R/r-life-insurance-contracts BugReports: https://gitlab.open-tools.net/R/r-life-insurance-contracts/-/issues +" diff --git a/R/HelperFunctions.R b/R/HelperFunctions.R index 9420f18..7dc0be1 100644 --- a/R/HelperFunctions.R +++ b/R/HelperFunctions.R @@ -129,7 +129,7 @@ mergeValues3D = function(starting, ending, t) { } else if (t == 0) { ending } else { - abind(starting[1:t,,], ending[-1:-t,,], along = 1) + abind::abind(starting[1:t,,], ending[-1:-t,,], along = 1) } } # Caution: px is not neccessarily 1-qx, because we might also have dread diseases so that px=1-qx-ix! However, the ix is not used for the survival present value diff --git a/R/InsuranceContract.R b/R/InsuranceContract.R index 2942750..fc3a6cc 100644 --- a/R/InsuranceContract.R +++ b/R/InsuranceContract.R @@ -32,7 +32,7 @@ NULL #' # Calculation approach: Valuation #' #' The calculation of all contract values is controlled by the function -#' \ifelse{html}{\href{method-calculateContract}{\code{InsuranceContract$calculateContract()}}}{\code{InsuranceContract$calculateContract()()}} (using methods of the [InsuranceTarif] +#' \ifelse{html}{\href{#method-calculateContract}{\code{InsuranceContract$calculateContract()}}}{\code{InsuranceContract$calculateContract()()}} (using methods of the [InsuranceTarif] #' object) and follows the following logic: #' #' 1. First the **contingent (unit) cash flows** and the **transition probbilities** diff --git a/README.md b/README.md index fbc5300..b96611f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,8 @@ -# r-life-insurance-contracts -R package implementing general insurance contracts +# The *LifeInsuranceContracts* Package For Traditional Life Insurance with Guarantee and Profit Participation +R package implementing general life insurance contracts + +This package R6 classes to model traditional life insurance + contracts like annuities, whole life insurances or endowments. All relevant + quantities like premium decomposition, reserves and benefits over the whole + contract period are calculated and potentially exported to excel. Mortalities + are given using the MortalityTables package. diff --git a/man/InsuranceContract.Rd b/man/InsuranceContract.Rd index 3bad207..e952c14 100644 --- a/man/InsuranceContract.Rd +++ b/man/InsuranceContract.Rd @@ -30,7 +30,7 @@ field of the object. \section{Calculation approach: Valuation}{ The calculation of all contract values is controlled by the function -\ifelse{html}{\href{method-calculateContract}{\code{InsuranceContract$calculateContract()}}}{\code{InsuranceContract$calculateContract()()}} (using methods of the \link{InsuranceTarif} +\ifelse{html}{\href{#method-calculateContract}{\code{InsuranceContract$calculateContract()}}}{\code{InsuranceContract$calculateContract()()}} (using methods of the \link{InsuranceTarif} object) and follows the following logic: \enumerate{ \item First the \strong{contingent (unit) cash flows} and the \strong{transition probbilities} diff --git a/vignettes/using-the-lifeinsurancecontracts-package.Rmd b/vignettes/using-the-lifeinsurancecontracts-package.Rmd index 7e2976e..2f196c0 100644 --- a/vignettes/using-the-lifeinsurancecontracts-package.Rmd +++ b/vignettes/using-the-lifeinsurancecontracts-package.Rmd @@ -1512,7 +1512,7 @@ lapply(blk, function(b) { In addition to the above guaranteed values, many contracts also include some kind of profit sharing. The total amount of money to be distributed is usually predetermined by law or regulation (in Austria by the -[https://www.ris.bka.gv.at/GeltendeFassung.wxe?Abfrage=Bundesnormen&Gesetzesnummer=20009295]("Lebensversicherung-Gewinnbeteiligungsverordnung -- LV-GBV")), +["Lebensversicherung-Gewinnbeteiligungsverordnung -- LV-GBV"](https://www.ris.bka.gv.at/GeltendeFassung.wxe?Abfrage=Bundesnormen&Gesetzesnummer=20009295), but the actual way they are distributed to individual contracts is up the insurance undertaking. The profit participation scheme defines profit participation allocations based on certain rates and bases, where the formulas and the types -- GitLab