select_lifetable: Select lifetable from dataset.

Description Usage Arguments Details Value Examples

Description

Select from a lifetable dataset by year and state.

Usage

1
select_lifetable(df, year = 2013, loc = "AU")

Arguments

df

a data.frame such as abs_lt supplied by this package.

year

integer year specifying the first year of the lifetable, interpretation depends on dataset, i.e.

ABS (abs_lt)

2002 refers to the 2002-2004 lifetable

loc

abbreviation of location to retrieve, default value is 'AU' for the national life-table, other valid values depend on the dataset,

ABS (abs_lt)

'ACT', 'NSW', 'NT', 'QLD', 'SA', 'TAS', 'VIC' and 'WA'

Details

Performs a simple filter and select to extract lifetable data by year and location code (e.g. state).

Value

data.frame of lifetable in a long format: age, sex, measurement type (e.g. 'lx', 'qx' etc.) and the value.

Examples

1
  select_lifetable(abs_lt, 2010, 'QLD')

stephematician/lifetable documentation built on May 30, 2019, 3:17 p.m.