Commit 9e37d77a authored by Reinhold Kainhofer's avatar Reinhold Kainhofer

Add mT.setDimInfo function to set the dimensional infor for makeQxDataFrame

parent 775ff4df
......@@ -183,6 +183,9 @@ mT.extrapolateProbsExp = function(table, age, up = TRUE) {
mT.fitExtrapolationLaw = function(table, method = "LF2", law = "HP",
fit = 75:99, extrapolate = 80:120,
fadeIn = 80:90, fadeOut = NULL) {
if (!is(table, "mortalityTable"))
stop("First argument must be a mortalityTable.")
ages = ages(table)
if (!is.null(table@exposures) && !is.na(table@exposures)) {
Ex = table@exposures
......@@ -215,3 +218,16 @@ mT.fitExtrapolationLaw = function(table, method = "LF2", law = "HP",
table
}
#' @export
mT.setDimInfo = function(table, ..., append = TRUE) {
if (!is(table, "mortalityTable"))
stop("First argument must be a mortalityTable.")
if (append) {
table@data$dim[names(list(...))] = list(...)
} else {
table@data$dim = list(...)
}
table
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment