Learn R Programming

SEERaBomb (version 2019.2)

mkMrtLocal: Make mortality binaries from local HMD data files

Description

Converts locally installed Human Mortality Data http://www.mortality.org/ into an R binary file mrtCOUNTRY.RData.

Usage

mkMrtLocal(country="USA",mrtHome="~/data/mrt",
                    mrtSrc1="~/data/hmd_countries",
                    mrtSrc2="~/data/hmd_statistics/death_rates/Mx_1x1"
                    )

Arguments

country

Default is USA. See names of subfolders of hmd_countries for other options.

mrtHome

Directory that will contain the mortality data binary. Should be writable by user.

mrtSrc1

Directory with hmd_countries data (first choice of files = "all HMD countries").

mrtSrc2

Directory with hmd_statistics data (second choice of files = "all HMD statistics").

Value

None. This function is called for its side-effect of producing mrt.RData from HMD files organized as all HMD countries or all HMD statistics on the HMD download page (you need at least one of these).

References

Barbieri M, Wilmoth JR, Shkolnikov VM, et al. Data Resource Profile: The Human Mortality Database (HMD). Int J Epidemiol. 2015;44: 1549-1556.

See Also

SEERaBomb-package,mkSEER

Examples

Run this code
# NOT RUN {
library(SEERaBomb)
mkMrtLocal() 
load("~/data/mrt/mrtUSA.RData")
head(mrt$Female)
# }

Run the code above in your browser using DataLab