Commit 0c05d743 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer

Allow lists of mortality tables to be passed to plotMortalityTables

parent 2dd8ac4e
......@@ -19,12 +19,14 @@
#'
#' @export
makeQxDataFrame = function(..., YOB = 1972, Period = NA, reference = NULL) {
# If reference is given, normalize all probabilities by that table!
data = list(...);
# Allow lists of tables to be passed, too. unlist should always return
# a list of tables, if if nested lists or only tables are passed as arguments!
data = unlist(list(...));
names(data) = lapply(data, function(t) t@name);
reference_ages = NULL;
if (missing(Period)) {
# If reference is given, normalize all probabilities by that table!
if (!missing(reference)) {
reference_ages = ages(reference);
reference = deathProbabilities(reference, YOB = YOB);
......
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