showFun {demlife}R Documentation

Get or set the life table functions shown by default by a life table.

Description

Extract or change the showFun slot of an object of class LifeTable. The showFun slot controls the way that life table functions are displayed, as well as output via functions such as as.data.frame. However it does not affect the underlying data contained in the LifeTable object.

Usage

showFun(object)

showFun(object) <- value

## S4 method for signature 'LifeTable'
showFun(object)

## S4 replacement method for signature 'LifeTable'
showFun(object) <- value

Arguments

object

An object of class LifeTable.

value

A character vector with names of life table functions.

Details

See the documentation for lifeTableFun for a list of the valid life table functions.

Value

The extraction function returns a character vector and the replacement function returns a LifeTable object with a new value for the showFun slot.

See Also

Life tables are created using function LifeTable.

Examples

mx <- dembase::ValuesOne(c(0.2, 0.05, 0.1, 0.4),
               labels = c("0", "1-4", "5-9", "10+"),
               name = "age")
lt <- LifeTable(mx)
lt
showFun(lt)
showFun(lt) <- c("ex", "lx")
lt

[Package demlife version 0.0.0.9007 Index]