50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

relsurv (version 1.2)

joinrate: Join ratetables

Description

The function joins two or more objects organized as ratetable by adding a new dimension.

Usage

joinrate(tables,dim.name="country")

Arguments

tables
a list of ratetables. If names are given, they are included as dimnames.
dim.name
the name of the added dimension.

Value

  • An object of class ratetable.

Details

This function joins two or more ratetable objects by adding a new dimension. The cutpoints of all the rate tables are compared and only the common intervals kept. If the intervals defined by the cutpoints are not of the same length, a warning message is displayed. Each rate table must have 3 dimensions, i.e. age, sex and year (the order is not important).

See Also

ratetable, transrate.hld, transrate.hmd, transrate.

Examples

Run this code
data(ratetables)
newpop <- joinrate(list(Arizona=survexp.az,Florida=survexp.fl,Minnesota=survexp.mn),dim.name="state")

Run the code above in your browser using DataLab