mT.cleanup: Remove all non-essential data (raw data, etc.) from a...

Description Usage Arguments Details Methods (by class) Examples

Description

The function mt.cleanup removes all non-essential data from a given mortalityTable object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
mT.cleanup(object)

## S4 method for signature 'mortalityTable'
mT.cleanup(object)

## S4 method for signature 'mortalityTable.period'
mT.cleanup(object)

## S4 method for signature 'mortalityTable.trendProjection'
mT.cleanup(object)

## S4 method for signature 'array'
mT.cleanup(object)

## S4 method for signature 'list'
mT.cleanup(object)

## S4 method for signature 'pensionTable'
mT.cleanup(object)

## S4 method for signature 'mortalityTable.observed'
mT.cleanup(object)

Arguments

object

The mortalityTable object to be cleaned.

Details

Mortality tables are often generated from raw data, that is smoothed, extrapolated, etc. The mortalityTable class and its implementations can internally store the raw probabilities and the intermediate results and parameters. This method removes those information. All essential information (base table, ages, trend functions, etc.) are preserved.

Removed information includes: * all elements of the object@data list, except for dim * exposures * names of named age, deathProbs and trend vectors

For mortality tables with other mortalityTable components (like pension tables or mixed tables), all components are cleaned.

Methods (by class)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
mortalityTables.load("Austria_Census")
# Whittaker-Henderson smoothing stores the raw input and the weights in the
# \code{data} slot of the table:
AT.smoothed = whittaker.mortalityTable(mort.AT.census.2011.male)
AT.smoothed@data$rawProbs
AT.smoothed@data$whittaker

# cleaning up the table removes those non-essential information again:
AT.smoothed.clean = mT.cleanup(AT.smoothed)
AT.smoothed.clean@data$rawProbs
AT.smoothed.clean@data$whittaker

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