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

Description Usage Arguments Details Value See Also Examples

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

1
2
3
4
5
6
7
8
9
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

1
2
3
4
5
6
7
8
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

StatisticsNZ/demlife documentation built on April 27, 2021, 10:02 p.m.