View source: R/load_hmd_lifetab.R
load_hmd_lifetab | R Documentation |
A wrapper function for HMDHFDplus::readHMDweb
to load HMD data (both male and female) for the first time. If a file for the year (based on Sys.Date()
) already exists, the download is skipped. Updates can be forced with force_update = TRUE
.
See https://towardsdatascience.com/using-dotenv-to-hide-sensitive-information-in-r-8b878fa72020 how to set and load environment data for username and password.
load_hmd_lifetab(
path_to_file = "data/hmd/",
force_update = FALSE,
country = "NLD",
hmd_user = Sys.getenv("HMD_USER"),
hmd_password = Sys.getenv("HMD_PW")
)
path_to_file |
A character for path to file. Default is |
force_update |
If |
country |
Country for which HMD data should be downloaded. Default is "NL". |
hmd_user |
HMD username. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.