mT.fillAges: Restrict/expand a mortalityTable to certain ages

Description Usage Arguments Examples

View source: R/utilityFunctions.R

Description

Restrict the given mortalityTable object(s) to given ages, potentially filling with NA values to ensure they cover the full desired age range

Usage

1
mT.fillAges(table, neededAges, fill = 0)

Arguments

table

A life table object (instance of a mortalityTable class) or a list, table or array of mortalityTable objects

neededAges

The vector of ages the returned objects should cover (even if the values are 0 or NA)

fill

The value to use for all ages for which the original table(s) do not have any information

Examples

1
2
3
4
mortalityTables.load("Austria_Annuities")
# return a table with only ages 100-130, where ages above 120 (not defined
# in the original table) are filled with qx=1:
mT.fillAges(AVOe2005R.male, neededAges = 100:130, fill = 1)

kainhofer/r-mortality-tables documentation built on Dec. 17, 2020, 3:53 a.m.