mkMrtLocal: Make mortality binaries from local HMD data files

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/mkMrtLocal.R

Description

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

Usage

1
2
3
4
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).

Author(s)

Tom Radivoyevitch (radivot@ccf.org)

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

1
2
3
4
5
6
7
## Not run: 
library(SEERaBomb)
mkMrtLocal() 
load("~/data/mrt/mrtUSA.RData")
head(mrt$Female)

## End(Not run)

SEERaBomb documentation built on Dec. 16, 2019, 1:21 a.m.