read_hfd | R Documentation |
vital
object for use in other functionsread_hfd
reads single-year and single-age data from the Human Fertility Database (HFD
https://www.humanfertility.org) and constructs a vital
object suitable
for use in other functions. This function uses HMDHFDplus::readHFDweb()
to download the required data. It is designed to handle age-specific fertility rates.
It may be extended to handle other types of data in the future.
read_hfd(country, username, password, variables = "asfrRR")
country |
Directory abbreviation from the HMD. For instance, Norway = "NOR". |
username |
HFD username (case-sensitive) |
password |
HFD password (case-sensitive) |
variables |
List of variables to download from the HFD. By default, the age-specific fertility rate (asfrRR) is downloaded. |
In order to read the data, users are required to create an account with the HFD website (https://www.humanfertility.org), and obtain a valid username and password.
read_hfd
returns a vital
object combining the downloaded data.
Rob J Hyndman
## Not run:
norway <- read_hfd(
country = "NOR",
username = "Nora.Weigh@mymail.com",
password = "FF!5xeEFa6"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.