lexis.hmd: Deprecated. Fill Lexis triangles by HMD data

Description Usage Arguments Details Author(s) Examples

View source: R/lexis.hmd.R

Description

The function opens an existing Lexis grid and fill the triangles according to data from the Human Mortality Database.

Usage

1
lexis.hmd(lg, hmd.data, column)

Arguments

lg,

an existing object originally created with lexis.grid().

hmd.data,

a data.frame created with prepare.hmd().

column

character, the name of the column of hmd.data the triangles shall be filled with.

Details

The function creates a subset of hmd.data that fits in the dimensions of the existing Lexis grid. The triangles will be filled according to the data in column.

Author(s)

Philipp Ottolinger

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
library(LexisPlotR)
lg <- lexis.grid(year.start = 1980, year.end = 1985, age.start = 0, age.end = 5)
# Load sample data
path <- system.file("extdata", "Deaths_lexis_sample.txt", package = "LexisPlotR")
deaths.triangles <- prepare.hmd(path)
lexis.hmd(lg = lg, hmd.data = deaths.triangles, column = "Total")

### Plot data not explicitly present in HMD data
deaths.triangles$RatioMale <- deaths.triangles$Male / deaths.triangles$Total
lexis.hmd(lg, deaths.triangles, "RatioMale")

## End(Not run)

ottlngr/LexisPlotR documentation built on Jan. 12, 2020, 6:57 p.m.