Learn R Programming

ROMIplot (version 1.0)

readHMDformat: A function to read data from the Human Mortality Database ("HMD")

Description

This function to read HMD data uses code from Tim Riffe's package HMDHFDplus, which has not been published on CRAN (yet), but is available at the webpage of the Max Planck Institute for Demographic Research. Please see "References" for more details.

Usage

readHMDformat(CNTRY = NULL, username = NULL, password = NULL, fixup = TRUE)

Arguments

CNTRY
Data for which country do you want?
username
Please supply your HMD username. Typically your email address.
password
Please supply your HMD password.
fixup
Logical. Should columns be made more user-friendly, e.g., forcing Age to be integer?

Value

deaths
A data frame containing death counts from the Human Mortality Database for country CNTRY in 1x1 (age x year) resolution
exposures
A data frame containing exposure to risk information from the Human Mortality Database for country CNTRY in 1x1 (age x year) resolution

Details

You need to register first at the Human Mortality Database at www.mortality.org to use this function.

References

Riffe, T (2015): Reading Human Fertility Database and Human Mortality Database data into R. MPIDR Technical Report TR-2015-004, 5 pages (June 2015), includes R package HMDHFDplus. Available online at: http://goo.gl/qFC4JA

Examples

Run this code
## Not run: readHMDformat(CNTRY='USA', username=your@HMD.username,
#                        password=yourHMDpassword)## End(Not run)

Run the code above in your browser using DataLab