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

deathProbabilities: Use age vector instead of hardcoded ages starting from 0

parent 642e4dd7
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ setMethod("deathProbabilities","mortalityTable.trendProjection",
function (object, ..., YOB = 1975) {
qx=object@deathProbs * (1 + object@loading);
if (is.null(object@trend2) || length(object@trend2) <= 1) {
ages = 0:(length(qx)-1);
ages = object@ages;
damping = sapply(
ages,
function (age) { object@dampingFunction(YOB + age - object@baseYear) }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment