Skip to content
Snippets Groups Projects
Commit 72df9738 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer Committed by Reinhold Kainhofer
Browse files

Fix vignette build and CRAN checks

parent def8ba28
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,8 @@ Imports:
stringr,
methods,
rlang,
kableExtra,
pander,
tidyr
License: GPL (>= 2)
RoxygenNote: 7.1.1
......@@ -48,8 +50,6 @@ Collate:
Suggests:
knitr,
rmarkdown,
pander,
kableExtra,
magrittr,
tibble,
testthat
......
......@@ -280,12 +280,12 @@ getContractBlockPremiums = function(contract) {
#' Convert the array containing cost values like cashflows, present
#' values, etc. (objects of dimension tx5x3) to a matrix with dimensions (tx15)
#'
#' #parameter costValues Cost definition data structure
#' @param costValues Cost definition data structure
costValuesAsDF = function(costValues) {
as.data.frame.table(costValues, responseName = "Value", stringsAsFactors = TRUE) %>%
mutate(Var4 = recode(.data$Var4, "Erl." = "")) %>%
arrange(.data$Var4, .data$Var2, .data$Var3, .data$Var1) %>%
unite(.data$costtype, .data$Var2, .data$Var3, .data$Var4, sep = " ") %>%
unite("costtype", "Var2", "Var3", "Var4", sep = " ") %>%
pivot_wider(names_from = .data$costtype, values_from = .data$Value) %>%
mutate(Var1 = NULL)
}
......
......@@ -6,6 +6,9 @@
\usage{
costValuesAsDF(costValues)
}
\arguments{
\item{costValues}{Cost definition data structure}
}
\description{
Convert the cost values array to a tx15 matrix
}
......@@ -13,6 +16,4 @@ Convert the cost values array to a tx15 matrix
Not to be called directly, but implicitly by the \link{InsuranceContract} object.
Convert the array containing cost values like cashflows, present
values, etc. (objects of dimension tx5x3) to a matrix with dimensions (tx15)
#parameter costValues Cost definition data structure
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment