mT.fillAges {MortalityTables} | R Documentation |
Restrict/expand a mortalityTable to certain ages
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
mT.fillAges(table, neededAges, fill = 0)
Arguments
table |
A life table object (instance of a |
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
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)
[Package MortalityTables version 2.0.5 Index]