diff --git a/inst/DataTemplates/AVOe2018P_Pensionstafeln_Angestellte.xlsx b/inst/DataTemplates/AVOe2018P_Pensionstafeln_Angestellte.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..af489caeadfbbcf6cbee966ff99f66d5bf78c60f Binary files /dev/null and b/inst/DataTemplates/AVOe2018P_Pensionstafeln_Angestellte.xlsx differ diff --git a/inst/DataTemplates/AVOe2018P_Pensionstafeln_Mischbestand.xlsx b/inst/DataTemplates/AVOe2018P_Pensionstafeln_Mischbestand.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..7e7beceb049119336f3ac86bc7985409b1fe37cc Binary files /dev/null and b/inst/DataTemplates/AVOe2018P_Pensionstafeln_Mischbestand.xlsx differ diff --git a/inst/DataTemplates/Austria_Pensions_AVOe1999P.xlsx b/inst/DataTemplates/Austria_Pensions_AVOe1999P.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..d99c6400816d6124647eeb02121e09973b8f3858 Binary files /dev/null and b/inst/DataTemplates/Austria_Pensions_AVOe1999P.xlsx differ diff --git a/inst/DataTemplates/Austria_Pensions_AVOe2008P.xlsx b/inst/DataTemplates/Austria_Pensions_AVOe2008P.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..f9d65607544aa5a166223d29d5bfb6200ca6ae1a Binary files /dev/null and b/inst/DataTemplates/Austria_Pensions_AVOe2008P.xlsx differ diff --git a/inst/DataTemplates/Austria_Pensions_EttlPagler.xlsx b/inst/DataTemplates/Austria_Pensions_EttlPagler.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..7ce25813aacb4b9d8c64bd8676688046ddae0ca7 Binary files /dev/null and b/inst/DataTemplates/Austria_Pensions_EttlPagler.xlsx differ diff --git "a/inst/DataTemplates/ICSLT\302\2512013.xlsx" "b/inst/DataTemplates/ICSLT\302\2512013.xlsx" new file mode 100644 index 0000000000000000000000000000000000000000..c2880f8078d0f324c952d6461441ab7f08675bd3 Binary files /dev/null and "b/inst/DataTemplates/ICSLT\302\2512013.xlsx" differ diff --git "a/inst/DataTemplates/ICSLT\302\2512018.xlsx" "b/inst/DataTemplates/ICSLT\302\2512018.xlsx" new file mode 100644 index 0000000000000000000000000000000000000000..3dc0a052d1934b089a9187e454f0802e738e52db Binary files /dev/null and "b/inst/DataTemplates/ICSLT\302\2512018.xlsx" differ diff --git a/inst/extdata/MortalityTables_ICSLT.R b/inst/extdata/MortalityTables_ICSLT.R index 19b5309ee9a4de4c1a7c48a81c7b6d4894fb7fe0..a3990638fee6765f59b6ce7c66ebdd5f02ea0521 100644 --- a/inst/extdata/MortalityTables_ICSLT.R +++ b/inst/extdata/MortalityTables_ICSLT.R @@ -1,7 +1,7 @@ #' @import MortalityTables NULL -stopifnot(require(methods), require(utils), require(MortalityTables), require(dplyr)) # MortalityTable classes; new; Excel reader +stopifnot(require(methods), require(utils), require(MortalityTables), require(dplyr), require(readxl)) # MortalityTable classes; new; Excel reader ############################################################################### # # ICSLT - International Civil Servants Life Table ---- @@ -24,7 +24,7 @@ readICSLT = function(filename, name = "ICSLT 2018", year = 2018, coloffset = 0) years = as.numeric(head[1,which(head[2,] == "qx_Male")]), ages = qx[,1, drop = TRUE], data = list( - dim = list(sex = "m", collar = "ICSLT", type = name, data = "official", year = year) + dim = list(sex = "m", collar = "ICSLT", table = name, type = name, data = "official", year = year) ) ) ICSLT$w = mortalityTable.observed( @@ -33,7 +33,7 @@ readICSLT = function(filename, name = "ICSLT 2018", year = 2018, coloffset = 0) years = as.numeric(head[1,which(head[2,] == "qx_Female")]), ages = qx[,1, drop = TRUE], data = list( - dim = list(sex = "f", collar = "ICSLT", type = name, data = "official", year = year) + dim = list(sex = "f", collar = "ICSLT", table = name, type = name, data = "official", year = year) ) ) ICSLT @@ -50,11 +50,11 @@ if (!is.null(getOption("MortalityTables.ICSLT2013"))) { } else { message("Path to the ICSLT©2013.xlsx data file (option 'MortalityTables.ICSLT2013' not set, ICSLT2013 will not be available!") } -if (!is.null(getOption("MortalityTables.ICSLT2008"))) { - ICSLT2008 = readICSLT(getOption("MortalityTables.ICSLT2008"), name = "ICSLT 2008", year = 2008) -} else { - message("Path to the ICSLT©2008.xlsx data file (option 'MortalityTables.ICSLT2008' not set, ICSLT2008 will not be available!") -} +# if (!is.null(getOption("MortalityTables.ICSLT2008"))) { +# ICSLT2008 = readICSLT(getOption("MortalityTables.ICSLT2008"), name = "ICSLT 2008", year = 2008) +# } else { +# message("Path to the ICSLT©2008.xlsx data file (option 'MortalityTables.ICSLT2008' not set, ICSLT2008 will not be available!") +# } # options(MortalityTables.ICSLT2013 = "/home/reinhold/R/Tables-Private/ICSLT/ICSLT©2013.xlsx") # options(MortalityTables.ICSLT2018 = "/home/reinhold/R/Tables-Private/ICSLT/ICSLT©2018.xlsx") diff --git a/TODO/PensionTables_Austria_AVOe2018P.R b/inst/extdata/PensionTables_Austria_AVOe2018P.R similarity index 86% rename from TODO/PensionTables_Austria_AVOe2018P.R rename to inst/extdata/PensionTables_Austria_AVOe2018P.R index e6863511ad75bf9a4567f5248036204cac1c33d9..145b860b1be0b07edf3850032c8d7da4d7a6c8d4 100644 --- a/TODO/PensionTables_Austria_AVOe2018P.R +++ b/inst/extdata/PensionTables_Austria_AVOe2018P.R @@ -9,26 +9,15 @@ stopifnot(require(methods), require(utils), require(MortalityTables), require(dp # Pension Table AVÖ 2018-P ---- ############################################################################### # -AVOe2018P = array( - data = c(mortalityTable.NA), - dim = c(3, 2, 2), - dimnames = list(Geschlecht = c("m", "w", "u"), Bestand = c("Angestellte", "Mischbestand"), Invalidisierung = c("IP", "IPRG")) -) - -{ - AVOe2018P.file.Ang = getOption("MortalityTables.AVOe2018PAng") - AVOe2018P.file.Misch = getOption("MortalityTables.AVOe2018PMisch") - - if (is.null(AVOe2018P.file.Ang)) { - warning("The pension table AVOe2018P requires the Excel file 'AVOe2018P_Pensionstafeln_Angestellte.xlsx'. Please set the paths to it with options(\"MortalityTables.AVOe2018PAng\" = \"/path/to/AVOe2018P_Pensionstafeln_Angestellte.xlsx\"") - } - if (is.null(AVOe2018P.file.Misch)) { - warning("The pension table AVOe2018P requires the Excel file 'AVOe2018P_Pensionstafeln_Mischbestand.xlsx'. Please set the paths to it with options(\"MortalityTables.AVOe2018PMisch\" = \"/path/to/AVOe2018P_Pensionstafeln_Mischbestand.xlsx\"") - } - - if (!is.null(AVOe2018P.file.Ang) && !is.null(AVOe2018P.file.Misch)) { - +if (is.null(getOption("MortalityTables.AVOe2018PAng")) && is.null(getOption("MortalityTables.AVOe2018PMisch"))) { + message("The pension table AVOe2018P requires the Excel files 'AVOe2018P_Pensionstafeln_Angestellte.xlsx' or 'AVOe2018P_Pensionstafeln_Mischbestand.xlsx'. Please set the paths to them with options(\"MortalityTables.AVOe2018PAng\" = \"/path/to/AVOe2018P_Pensionstafeln_Angestellte.xlsx\") and options(\"MortalityTables.AVOe2018PMisch\" = \"..\").") +} else { + AVOe2018P = array( + data = c(mortalityTable.NA), + dim = c(3, 2, 2), + dimnames = list(Geschlecht = c("m", "w", "u"), Bestand = c("Angestellte", "Mischbestand"), Invalidisierung = c("IP", "IPRG")) + ) #------------------------------------------------------------------------------- - # Functions to load the tables (raw base tables and trend) and the additional info ---- @@ -44,17 +33,20 @@ AVOe2018P = array( loadAVOe2018P.data = function(file, sex = "M", collar = "Angestellte", IPtype = "IP") { + if (is.null(file)) { + return() + } if (!sex %in% c("M", "F", "U")) { warning("Invalid sex given in call to loadAVOe2018P.table: ", sex, "; Allowed values are M, F and U.") - return + return() } if (!collar %in% c("Angestellte", "Mischbestand")) { warning("Invalid collar given in call to loadAVOe2018P.table: ", collar, "; Allowed values are Angestellte and Mischbestand.") - return + return() } if (!IPtype %in% c("IP", "IPRG")) { warning("Invalid type given in call to loadAVOe2018P.table: ", IPtype, "; Allowed values are IP and IPRG.") - return + return() } sheet = recode(sex, "M" = "Männer", "F" = "Frauen", "U" = "Unisex") @@ -212,11 +204,17 @@ AVOe2018P = array( for (sex in dimnames(AVOe2018P)$Geschlecht) { for (collar in dimnames(AVOe2018P)$Bestand) { for (IPtype in dimnames(AVOe2018P)$Invalidisierung) { - fl = if(collar == "Mischbestand") AVOe2018P.file.Misch else AVOe2018P.file.Ang - AVOe2018P[[sex, collar, IPtype]] = loadAVOe2018P.data(file = fl, sex = recode(sex, "m" = "M", "w" = "F", "u" = "U"), collar = collar, IPtype = IPtype) + AVOe2018P[[sex, collar, IPtype]] = loadAVOe2018P.data( + file = if(collar == "Mischbestand") + getOption("MortalityTables.AVOe2018PMisch") + else + getOption("MortalityTables.AVOe2018PAng"), + sex = recode(sex, "m" = "M", "w" = "F", "u" = "U"), + collar = collar, + IPtype = IPtype) } } } - } + rm(loadAVOe2018P.data) } diff --git a/TODO/PensionTables_Austria_EttlPagler.R b/inst/extdata/PensionTables_Austria_EttlPagler.R similarity index 50% rename from TODO/PensionTables_Austria_EttlPagler.R rename to inst/extdata/PensionTables_Austria_EttlPagler.R index 1a4a0fcc256afd545767ecea24e6fe7cd898744d..72553aad9ea688f89e3c0cf0b20b8ed37377ca4e 100644 --- a/TODO/PensionTables_Austria_EttlPagler.R +++ b/inst/extdata/PensionTables_Austria_EttlPagler.R @@ -1,21 +1,25 @@ #' @import MortalityTables NULL -stopifnot(require(methods), require(utils), require(MortalityTables)) # MortalityTable classes; new; Excel reader +stopifnot(require(methods), require(utils), require(MortalityTables), require(readxl)) # MortalityTable classes; new; Excel reader +############################################################################### # +# Pension Table AVÖ 2018-P ---- +############################################################################### # + +if (is.null(getOption("MortalityTables.EttlPagler"))) { + message("The pension table EttlPagler requires the Excel file 'Austria_Pensions_EttlPagler.xlsx'. Please set its path with options(\"MortalityTables.EttlPagler\" = \"/path/to/Austria_Pensions_EttlPagler.xlsx\").") +} else { + ############################################################################### # Ettl/Pagler Male ############################################################################### -EttlPagler.data.M = utils::read.csv( - system.file( - "extdata", - "Austria_Pensions_EttlPagler_M.csv", - package = "MortalityTablesPrivate"), +EttlPagler.data.M = read_excel( + getOption("MortalityTables.EttlPagler"), skip = 5, - header = FALSE, - col.names = c("age", "qaax", "ix", "qix", "qgx", "qpx", "qwy", "hx", "yx", "x1") + col_names = c("age", "qaax", "ix", "qix", "qgx", "qpx", "qwy", "hx", "yx", "x1") ); EttlPaglerAges = EttlPagler.data.M[["age"]]; @@ -27,7 +31,7 @@ EttlPagler.male = pensionTable( ages = EttlPaglerAges, deathProbs = EttlPagler.data.M[["qaax"]], data = list( - dim = list(sex = "m", collar = "Gesamtbestand", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") + dim = list(sex = "m", collar = "Gesamtbestand", table = "Ettl/Pagler 1989", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") ) ), ix = mortalityTable.period( @@ -35,7 +39,7 @@ EttlPagler.male = pensionTable( ages = EttlPaglerAges, deathProbs = EttlPagler.data.M[["ix"]], data = list( - dim = list(sex = "m", collar = "Gesamtbestand", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Invalidisierung") + dim = list(sex = "m", collar = "Gesamtbestand", table = "Ettl/Pagler 1989", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Invalidisierung") ) ), qgx = mortalityTable.period( @@ -43,7 +47,7 @@ EttlPagler.male = pensionTable( ages = EttlPaglerAges, deathProbs = EttlPagler.data.M[["qgx"]], data = list( - dim = list(sex = "m", collar = "Gesamtbestand", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") + dim = list(sex = "m", collar = "Gesamtbestand", table = "Ettl/Pagler 1989", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") ) ), qix = mortalityTable.period( @@ -51,7 +55,7 @@ EttlPagler.male = pensionTable( ages = EttlPaglerAges, deathProbs = EttlPagler.data.M[["qix"]], data = list( - dim = list(sex = "m", collar = "Gesamtbestand", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") + dim = list(sex = "m", collar = "Gesamtbestand", table = "Ettl/Pagler 1989", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") ) ), rx = mortalityTable.zeroes(name = "No reactivation", ages = EttlPaglerAges), @@ -61,7 +65,7 @@ EttlPagler.male = pensionTable( ages = EttlPaglerAges, deathProbs = EttlPagler.data.M[["qpx"]], data = list( - dim = list(sex = "m", collar = "Gesamtbestand", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") + dim = list(sex = "m", collar = "Gesamtbestand", table = "Ettl/Pagler 1989", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") ) ), hx = mortalityTable.period( @@ -69,7 +73,7 @@ EttlPagler.male = pensionTable( ages = EttlPaglerAges, deathProbs = EttlPagler.data.M[["hx"]], data = list( - dim = list(sex = "m", collar = "Gesamtbestand", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Partnerwahrscheinlichkeit im Tod") + dim = list(sex = "m", collar = "Gesamtbestand", table = "Ettl/Pagler 1989", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Partnerwahrscheinlichkeit im Tod") ) ), qwy = mortalityTable.period( @@ -77,7 +81,7 @@ EttlPagler.male = pensionTable( ages = EttlPaglerAges, deathProbs = EttlPagler.data.M[["qwy"]], data = list( - dim = list(sex = "m", collar = "Gesamtbestand", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") + dim = list(sex = "m", collar = "Gesamtbestand", table = "Ettl/Pagler 1989", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") ) ), yx = mortalityTable.period( @@ -85,14 +89,15 @@ EttlPagler.male = pensionTable( ages = EttlPaglerAges, deathProbs = EttlPagler.data.M[["yx"]], data = list( - dim = list(sex = "m", collar = "Gesamtbestand", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Mittl. Hinterbliebenenalter") + dim = list(sex = "m", collar = "Gesamtbestand", table = "Ettl/Pagler 1989", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Mittl. Hinterbliebenenalter") ) ), invalids.retire = TRUE, data = list( Geschlecht = "Männer", Bestand = "Angestellte", - Invalidisierung = "Invaliditätspension" + Invalidisierung = "Invaliditätspension", + dim = list(sex = "m", collar = "Gesamtbestand", table = "Ettl/Pagler 1989", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989") ) ) @@ -100,14 +105,11 @@ EttlPagler.male = pensionTable( # Ettl/Pagler Female ############################################################################### -EttlPagler.data.F = utils::read.csv( - system.file( - "extdata", - "Austria_Pensions_EttlPagler_F.csv", - package = "MortalityTablesPrivate"), +EttlPagler.data.F = read_excel( + getOption("MortalityTables.EttlPagler"), + sheet = 2, skip = 5, - header = FALSE, - col.names = c("age", "qaay", "iy", "qiy", "qgy", "qpy", "qwx", "hy", "xy", "y1") + col_names = c("age", "qaay", "iy", "qiy", "qgy", "qpy", "qwx", "hy", "xy", "y1") ); EttlPaglerAges = EttlPagler.data.F[["age"]]; @@ -119,7 +121,7 @@ EttlPagler.female = pensionTable( ages = EttlPaglerAges, deathProbs = EttlPagler.data.F[["qaay"]], data = list( - dim = list(sex = "w", collar = "Gesamtbestand", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") + dim = list(sex = "w", collar = "Gesamtbestand", table = "Ettl/Pagler 1989", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") ) ), ix = mortalityTable.period( @@ -127,7 +129,7 @@ EttlPagler.female = pensionTable( ages = EttlPaglerAges, deathProbs = EttlPagler.data.F[["iy"]], data = list( - dim = list(sex = "w", collar = "Gesamtbestand", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Invalidisierung") + dim = list(sex = "w", collar = "Gesamtbestand", table = "Ettl/Pagler 1989", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Invalidisierung") ) ), qgx = mortalityTable.period( @@ -135,7 +137,7 @@ EttlPagler.female = pensionTable( ages = EttlPaglerAges, deathProbs = EttlPagler.data.F[["qgy"]], data = list( - dim = list(sex = "w", collar = "Gesamtbestand", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") + dim = list(sex = "w", collar = "Gesamtbestand", table = "Ettl/Pagler 1989", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") ) ), qix = mortalityTable.period( @@ -143,7 +145,7 @@ EttlPagler.female = pensionTable( ages = EttlPaglerAges, deathProbs = EttlPagler.data.F[["qiy"]], data = list( - dim = list(sex = "w", collar = "Gesamtbestand", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") + dim = list(sex = "w", collar = "Gesamtbestand", table = "Ettl/Pagler 1989", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") ) ), rx = mortalityTable.zeroes(name = "No reactivation", ages = EttlPaglerAges), @@ -153,7 +155,7 @@ EttlPagler.female = pensionTable( ages = EttlPaglerAges, deathProbs = EttlPagler.data.F[["qpy"]], data = list( - dim = list(sex = "w", collar = "Gesamtbestand", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") + dim = list(sex = "w", collar = "Gesamtbestand", table = "Ettl/Pagler 1989", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") ) ), hx = mortalityTable.period( @@ -161,7 +163,7 @@ EttlPagler.female = pensionTable( ages = EttlPaglerAges, deathProbs = EttlPagler.data.F[["hy"]], data = list( - dim = list(sex = "w", collar = "Gesamtbestand", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Partnerwahrscheinlichkeit im Tod") + dim = list(sex = "w", collar = "Gesamtbestand", table = "Ettl/Pagler 1989", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Partnerwahrscheinlichkeit im Tod") ) ), qwy = mortalityTable.period( @@ -169,7 +171,7 @@ EttlPagler.female = pensionTable( ages = EttlPaglerAges, deathProbs = EttlPagler.data.F[["qwx"]], data = list( - dim = list(sex = "w", collar = "Gesamtbestand", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") + dim = list(sex = "w", collar = "Gesamtbestand", table = "Ettl/Pagler 1989", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") ) ), yx = mortalityTable.period( @@ -177,17 +179,22 @@ EttlPagler.female = pensionTable( ages = EttlPaglerAges, deathProbs = EttlPagler.data.F[["xy"]], data = list( - dim = list(sex = "w", collar = "Gesamtbestand", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") + dim = list(sex = "w", collar = "Gesamtbestand", table = "Ettl/Pagler 1989", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989", risk = "Tod") ) ), invalids.retire = TRUE, data = list( Geschlecht = "Männer", Bestand = "Angestellte", - Invalidisierung = "Invaliditätspension" + Invalidisierung = "Invaliditätspension", + dim = list(sex = "w", collar = "Gesamtbestand", table = "Ettl/Pagler 1989", type = "Pensionstafel Österreich", data = "official", year = "Ettl/Pagler 1989") ) ) +EttlPagler = c(m = EttlPagler.male, w = EttlPagler.female) + rm(EttlPagler.data.F, EttlPagler.data.M, EttlPaglerAges) + +} diff --git a/vignettes/international-mortality-tables-overview.Rmd b/vignettes/international-mortality-tables-overview.Rmd index cc4991151137773f6acc561518e61099573d6bba..dbaf365642005e09bc017887ccb7636082a5aa51 100644 --- a/vignettes/international-mortality-tables-overview.Rmd +++ b/vignettes/international-mortality-tables-overview.Rmd @@ -88,6 +88,43 @@ Source: https://www.sirp-isrp.org/index.php?option=com_content&view=article&id=1 * ICSLT 2013 * ICSLT 2018 +* gender-specific cohort tables (yearly $q_x$ tabulated for a period of 25 years) + * male+female, ages 16-125 + * target population: +* Target collective: International Organisations whose staff are located in Europe +* Publisher: iSRP (OECD), https://www.sirp-isrp.org/index.php?option=com_content&view=article&id=1057&lang=en + +* Usage with the `MortalityTables` package: +```{r AVOe2005R, results="hide"} +mortalityTables.load("ICSLT") +ICSLT2013 +ICSLT2018 +``` + +### Comparisons + +```{r ICSLT.Comparison} +plotMortalityTables(ICSLT2013, ICSLT2018, + aes = aes(color = table, linetype = sex), Period = 2035, title = "ICSLT tables, Period 2035", + legend.position = "right" +) +plotMortalityTrend(ICSLT2013, ICSLT2018, + aes = aes(color = table, linetype = sex), Period = 2020, title = "ICSLT tables, Period 2020", + legend.position = "right", ages = 20:120 +) +plotMortalityTrend(ICSLT2013, ICSLT2018, + aes = aes(color = table, linetype = sex), Period = 2040, title = "ICSLT tables, Period 2040", + legend.position = "right", ages = 20:120 +) +plotMortalityTrend(ICSLT2013, ICSLT2018, + aes = aes(color = table, linetype = sex), YOB = 2000, title = "ICSLT mortality improvement, YOB 2020", + legend.position = "right", ages = 20:40 +) + +``` + + + ## EU Civil Servant Life Table * EU Life Table 2016