# a mortaar_life_table can be put together manually:
as.mortaar_life_table(data.frame(a = c(20, 20, 20), Dx = c(10, 15, 20)))
# a mortaar_life_table_list can be constructed from multiple mortaar_life_tables
schleswig <- as.mortaar_life_table_list(
list(
"schleswig data 1" = life.table(schleswig_ma[c("a", "Dx")]),
"schleswig data 2" = life.table(schleswig_ma[c("a", "Dx")])
)
)
# you can add new mortaar_life_tables to plot them with the others
schleswig$`schleswig data 3` <- life.table(schleswig_ma[c("a", "Dx")])
schleswig[["schleswig data 4"]] <- life.table(schleswig_ma[c("a", "Dx")])
# and you can create arbitrary subsets of mortaar_life_table_lists
schleswig_data_3 <- schleswig$`schleswig data 3`
schleswig_data_1_3_4 <- schleswig[c(1,3,4)]
Run the code above in your browser using DataLab