mT.round: Round all components of a mortality table to the given number...

Description Usage Arguments Methods (by class) Examples

Description

The function mt.round rounds all components (base table, potentially also trend functions or yearly improvement factors) to the given number of numerical digits. For pensionTable objects, the function is applied to all components

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
mT.round(object, digits = 8)

## S4 method for signature 'mortalityTable'
mT.round(object, digits = 8)

## S4 method for signature 'mortalityTable.period'
mT.round(object, digits = 8)

## S4 method for signature 'mortalityTable.trendProjection'
mT.round(object, digits = 8)

## S4 method for signature 'mortalityTable.improvementFactors'
mT.round(object, digits = 8)

## S4 method for signature 'array'
mT.round(object, digits = 8)

## S4 method for signature 'list'
mT.round(object, digits = 8)

## S4 method for signature 'pensionTable'
mT.round(object, digits = 8)

## S4 method for signature 'mortalityTable.observed'
mT.round(object, digits = 8)

Arguments

object

The mortalityTable object to be rounded (or a list / array of mortalityTable object)

digits

the desired number of significant digits to round to

Methods (by class)

Examples

1
2
3
4
5
6
7
mortalityTables.load("Austria_Census")
AT.rounded1 = mT.round(mort.AT.census.2011.male, 1)
AT.rounded2 = mT.round(mort.AT.census.2011.male, 2)
AT.rounded3 = mT.round(mort.AT.census.2011.male, 3)
plotMortalityTables(mort.AT.census.2001.male,
                    mT.setName(AT.rounded1, "rounded to 1 digit"),
                    mT.setName(AT.rounded3, "rounded to 3 digits"))

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