tidy_triangle_data: Tidy triangular data (Lexis triangles)
Description
Take raw data from a data source (e.g. Human Mortality Database) and make it 'tidy'.
Usage
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.
Value
A data.frame.
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.