readHMDformat: A function to read data from the Human Mortality Database...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/readHMDformat.R

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

1
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?

Details

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

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

Author(s)

Roland Rau, Tim Riffe

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

1
2
3
## Not run: readHMDformat(CNTRY='USA', username=your@HMD.username,
                       password=yourHMDpassword)
## End(Not run)

ROMIplot documentation built on May 1, 2019, 8:27 p.m.