View source: R/read_hmd_life_tables.R
read_hmd_life_tables | R Documentation |
Reading HMD life tables
read_hmd_life_tables(
path = getwd(),
files = c("mltper_1x1.txt", "fltper_1x1.txt", "bltper_1x1.txt")
)
path |
A character. Path to the folder with life tables. |
files |
A character. Names of files with life tables. |
A data frame containing mortality data with columns:
sex |
Character - sex ('male', 'female', or 'both') |
year |
Integer - the year of the data |
age |
Integer - age |
mortality_rate |
Numeric - mortality rate |
life_expectancy |
Numeric - life expectancy |
HMD. Human Mortality Database. Max Planck Institute for Demographic Research (Germany), University of California, Berkeley (USA), and French Institute for Demographic Studies (France). Available at www.mortality.org
## Not run:
# Download 'txt' files
# ("mltper_1x1.txt", "fltper_1x1.txt", "bltper_1x1.txt")
# for a given country to the working directory
# from https://www.mortality.org after registration.
read_hmd_life_tables(path = getwd())
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.