Learn R Programming

LifeInsuranceContracts (version 0.0.2)

makeContractGridDimname: Create human-readable labels for the dimensions in a contractGrid()

Description

The function makeContractGridDimname generates a short, human-readable dimension label for the entries along the axes of a contractGrid(). The default is to use the value unchanged as the row-/columnname, but for some parameter values (like a InsuranceTarif or mortalityTable) a custom method of this function is needed to create the (short) human-readable representation for the axes in the grid.

The function makeContractGridDimnames generate proper dimnames for all entries of the axes of a contractGrid() by calling makeContractGridDimname on each of the axes' values

Usage

makeContractGridDimname(value)

makeContractGridDimnames(axes)

Arguments

value

the value along the axis, for which a name should be generated

axes

the axes with all names, for which a name should be generated

Functions

  • makeContractGridDimname: Create a short, human-readable dimensional name for an object (default S3 method)

  • makeContractGridDimnames: Generate proper dimnames for all entries of the axes of a contractGrid()

Examples

Run this code
# NOT RUN {
library(MortalityTables)
mortalityTables.load("Austria_Census")

makeContractGridDimname(mort.AT.census.2011.unisex)

makeContractGridDimnames(axes = list(
    age = seq(30,60,10),
    mortalityTable = c(mort.AT.census.2011.unisex, mort.AT.census.2011.male,
                       mort.AT.census.2011.female))
)
# }

Run the code above in your browser using DataLab