radix: Get or set the radix of a life table.

Description Usage Arguments Details Value See Also Examples

Description

Extract or change the 'radix' of an object of class LifeTable. The radix of a life table is the value for l0, the first entry in the lx column. As well as affecting lx, changing the radix affects dx, Lx, and Tx.

Usage

1
2
3
4
5
6
7
8
9
radix(object)

radix(object) <- value

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

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

Arguments

object

An object of class LifeTable.

value

A positive number.

Details

radix must be a positive number, and defaults to 100,000.

Value

The extraction function returns a number and the replacement function returns a LifeTable object with a new radix.

See Also

Life tables are created using function LifeTable.

Examples

1
2
3
4
5
6
7
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)
radix(lt)
radix(lt) <- 1000
lt

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