lexis.hmd {LexisPlotR} | R Documentation |
Deprecated. Fill Lexis triangles by HMD data
Description
The function opens an existing Lexis grid and fill the triangles according to data from the Human Mortality Database.
Usage
lexis.hmd(lg, hmd.data, column)
Arguments
lg |
an existing object originally created with |
hmd.data |
a data.frame created with |
column |
character, the name of the column of |
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
## 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)
[Package LexisPlotR version 0.4.0 Index]