Learn R Programming

LifeInsureR (version 1.0.0)

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)

Value

The name of the entry in the dimnames of contractGrid()

an array of dimnames derived from the axes definitions of contractGrid()

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