tidy_triangle_data {LexisPlotR} | R Documentation |
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. |
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
## Not run:
triangles <- readHMDweb("RUS", "Deaths_lexis", "your@email.com", "your_password")
## End(Not run)
[Package LexisPlotR version 0.4.0 Index]