mT.round {MortalityTables}R Documentation

Round all components of a mortality table to the given number of digits

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

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

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"))


[Package MortalityTables version 2.0.5 Index]