prepare.hmd: Prepare HMD data for 'lexis.hmd()'

Description Usage Arguments Details Author(s) Examples

View source: R/prepare.hmd.R

Description

prepare.hmd() prepares the raw 'Deaths by Lexis triangles' HMD data for further use by lexis.hmd.

Usage

1

Arguments

file,

the name of the 'Deaths by Lexis triangles' file downloaded from the Human Mortality Database.

Details

This function reads the raw data into R and transforms data to numeric and Date. Furthermore seven columns (upper, x1, x2, x3, y1, y2, y3) that contain the coordinates of the triangles will be added. The age group 110+ will be removed from the data.

Author(s)

Philipp Ottolinger

Examples

1
2
3
4
library(LexisPlotR)
# Load sample data
path <- system.file("extdata", "Deaths_lexis_sample.txt", package = "LexisPlotR")
deaths.triangles <- prepare.hmd(path)

Example output

Loading required package: ggplot2
Warning message:
In prepare.hmd(path) : NAs introduced by coercion

LexisPlotR documentation built on May 30, 2017, 3:39 a.m.