mT.cleanup | R Documentation |
The function mt.cleanup removes all non-essential data from a given mortalityTable object.
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)
object |
The mortalityTable object to be cleaned. |
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.
mT.cleanup(mortalityTable)
: Clean up and remove all non-essential data from the mortalityTable object
mT.cleanup(mortalityTable.period)
: Clean up and remove all non-essential data from the mortalityTable.period object
mT.cleanup(mortalityTable.trendProjection)
: Clean up and remove all non-essential data from the mortalityTable.trendProjection object
mT.cleanup(array)
: Clean up and remove all non-essential data from the mortalityTable objects stored in the array
mT.cleanup(list)
: Clean up and remove all non-essential data from the mortalityTable objects stored in the list
mT.cleanup(pensionTable)
: Clean up and remove all non-essential data from the mortalityTable objects stored in the array
mT.cleanup(mortalityTable.observed)
: Clean up the internal data of the mortality table
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.