tidy_triangle_data: Tidy triangular data (Lexis triangles)

Description Usage Arguments Details Value Author(s) Examples

View source: R/tidy_triangle_data.R

Description

Take raw data from a data source (e.g. Human Mortality Database) and make it 'tidy'.

Usage

1
tidy_triangle_data(triangle_data, source = "HMD")

Arguments

triangle_data

data.frame, A data.frame containing raw triangle data.

source

character, The source of the raw data. Supported sources: HMD.

Details

When using raw triangular data from HMD or other sources, the data is not well prepared for further use. tidy_triangular_data does some transformations to prepare the data, mainly for visualization using ggplot2.

Value

A data.frame.

Author(s)

Philipp Ottolinger

Examples

1
2
3
4
## Not run: 
triangles <- readHMDweb("RUS", "Deaths_lexis", "your@email.com", "your_password")

## End(Not run)

LexisPlotR documentation built on April 14, 2020, 7:38 p.m.