Skip to content
Snippets Groups Projects
Commit 5e664b25 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Fix package dependencies, fix docs, fix contract example export

parent be2b9a8e
No related branches found
No related tags found
No related merge requests found
...@@ -18,3 +18,4 @@ import(abind) ...@@ -18,3 +18,4 @@ import(abind)
import(lubridate) import(lubridate)
import(openxlsx) import(openxlsx)
import(scales) import(scales)
import(stringr)
#' @include showVmGlgExamples.R exportInsuranceContract_xlsx.R InsuranceContract.R #' @include showVmGlgExamples.R exportInsuranceContract_xlsx.R InsuranceContract.R
#'
#' @import stringr
NULL NULL
#' Export the example calculations of an insurance contract #' Export the example calculations of an insurance contract
......
...@@ -36,7 +36,7 @@ NULL ...@@ -36,7 +36,7 @@ NULL
#' @export #' @export
showVmGlgExamples = function(contract, prf=10, t=10, t_prf=12, file="", ...) { showVmGlgExamples = function(contract, prf=10, t=10, t_prf=12, file="", ...) {
has.prf = prf <= contract$Parameters$ContractData$premiumPeriod; has.prf = prf < contract$Parameters$ContractData$premiumPeriod;
if (!("InsuranceContract" %in% class(contract))) { if (!("InsuranceContract" %in% class(contract))) {
stop("First argument to function showVmGlgExamples need to be an InsuranceContract object! ", stop("First argument to function showVmGlgExamples need to be an InsuranceContract object! ",
...@@ -100,8 +100,8 @@ showVmGlgExamples = function(contract, prf=10, t=10, t_prf=12, file="", ...) { ...@@ -100,8 +100,8 @@ showVmGlgExamples = function(contract, prf=10, t=10, t_prf=12, file="", ...) {
ifelse(has.prf, sprintf("Rückkaufswert (Prf.) (t=%d): %8.2f (VS: %.2f)", ifelse(has.prf, sprintf("Rückkaufswert (Prf.) (t=%d): %8.2f (VS: %.2f)",
t_prf, t_prf,
contract.prf$Values$reserves[t + 1, "Surrender"], contract.prf$Values$reserves[t_prf + 1, "Surrender"],
contract.prf$Values$reserves[t + 1, "PremiumFreeSumInsured"]), ""), contract.prf$Values$reserves[t_prf + 1, "PremiumFreeSumInsured"]), ""),
"", "",
ifelse(has.prf, sprintf("Prämienfreie VS (t=%d): %8.2f", ifelse(has.prf, sprintf("Prämienfreie VS (t=%d): %8.2f",
......
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
% Please edit documentation in R/showVmGlgExamples.R % Please edit documentation in R/showVmGlgExamples.R
\name{showVmGlgExamples} \name{showVmGlgExamples}
\alias{showVmGlgExamples} \alias{showVmGlgExamples}
\title{Display the values of the example calculation of the given insurance contract \title{Display insurance contract calculation example}
as required by the Austrian regulation (LV-VMGLV, "LV
Versicherungsmathematische Grundlagen Verordnung").}
\usage{ \usage{
showVmGlgExamples(contract, prf = 10, t = 10, t_prf = 12, file = "", showVmGlgExamples(contract, prf = 10, t = 10, t_prf = 12, file = "",
...) ...)
...@@ -24,7 +22,7 @@ showVmGlgExamples(contract, prf = 10, t = 10, t_prf = 12, file = "", ...@@ -24,7 +22,7 @@ showVmGlgExamples(contract, prf = 10, t = 10, t_prf = 12, file = "",
} }
\description{ \description{
Display the values of the example calculation of the given insurance contract Display the values of the example calculation of the given insurance contract
as required by the Austrian regulation (LV-VMGLV, "LV as required by the Austrian regulation (LV-VMGLV, "LV
Versicherungsmathematische Grundlagen Verordnung"). Versicherungsmathematische Grundlagen Verordnung").
} }
\examples{ \examples{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment