getDHSdata {surveyPrev} | R Documentation |
Download DHS survey data
Description
This function downloads DHS data for a particular country and survey.
Usage
getDHSdata(country, indicator = NULL, Recode = NULL, year)
Arguments
country |
Country name. |
indicator |
Indicator of interests. Current list of supported indicators include: "womananemia", "ancvisit4+", "stunting", "wasting", "DPT3". |
Recode |
Types of dhs Recode |
year |
Year the survey conducted. |
Value
This function returns the survey dataset that contains the indicator.
Author(s)
Qianyu Dong
Examples
## Not run:
# When indicator is known, download only the relevant file
dhsData <- getDHSdata(country = "Zambia",
indicator = "ancvisit4+",
year = 2018)
# When indicator is NULL or not recognized, download all files
dhsData <- getDHSdata(country = "Zambia",
indicator = NULL,
year = 2018)
names(dhsData)
## End(Not run)
[Package surveyPrev version 1.0.0 Index]