getDHScodes: Create a lookup table for DHS country and indicator codes,...

Description Usage Arguments Functions Examples

Description

Create a lookup table for DHS country and indicator codes, and find the country/indicator code based on the list

Usage

1
2
3
4
getDHScountry(country_names, return_table = FALSE)

getDHSindicator(indicators, refresh_indicators = FALSE,
  return_table = FALSE)

Arguments

country_names

string or list of strings of country names

return_table

whether to return the codes in a table containing their name and code, or just a collapsed list of the codes

indicators

string or list of strings of indicator names (or parts of their names)

refresh_indicators

T/F of whether to re-pull the indicator list from the DHS website. Takes a bit of time to execute

Functions

Examples

1
2
3
4
5
6
7
getDHScountry(c('Niger', 'Nigeria', 'Rwanda', 'Zambia'), return_table = FALSE)
getDHScountry(c('Niger', 'Nigeria', 'Rwanda', 'Zambia'), return_table = TRUE)
getDHScountry('Rwanda')
getDHScountry('Nige') # Returns an error.
stunted_indic = getDHSindicator('stunted', return_table = TRUE)
malnourished = getDHSindicator(c('stunted', 'wasted', 'underweight'))
getDHSindicator('studnted') # returns nothing

flaneuse/svywrangler documentation built on May 24, 2019, 2:49 p.m.