Description Usage Arguments Value Examples
View source: R/24-create_tables.R
Function to create weighted indicator results tables
1 2 3 4 5 6 7 8 9 | create_weighted_table(
df,
sex = FALSE,
ppiDF = recode_ppi(df = hh),
vars,
labs,
state,
digits = NULL
)
|
df |
A recoded data.frame of indicators |
sex |
Logical. Should results be disaggregated by sex? Default is FALSE |
ppiDF |
A data.frame produced when |
vars |
Variable names for indicator/s to create a results table for |
labs |
Variable labels for indicator/s to create a results table for |
state |
A character value for name of state to report results on. Choice between Kayah or Kayin. |
digits |
Integer value for number of digits to round off values. Default is NULL for no rounding off. |
A data.frame of indicator results for each state in total and disaggregated by urban, rural and hard-to-reach areas and by wealth quintile.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ## Recode MCCT indicators
mcctDF <- recode_mcct(df = create_mcct(df = hh, x = hhMembers))
create_weighted_table(df = mcctDF,
vars = c("mcct1", "mcct2"),
labs = c("MCCT coverage",
"Mean number of cash transfers received"),
state = "Kayah")
## Recode IYCF indicators
iycfDF <- recode_iycf(df = create_iycf(df = iycf, x = hh, y = hhMembers))
create_weighted_table(df = iycfDF,
sex = TRUE,
vars = c("eibf", "ebf", "mmf1", "mmf2", "mmf3", "mmf",
"fgscore", "mdd", "mad1", "mad2", "mad"),
labs = c("Early initiation of breastfeeding",
"Exclusive breastfeeding",
"Minimum meal frequency for breastfed 6-8 month old",
"Minimum meal frequency for breastfed 9-23 month old",
"Minimum meal frequency for non-breastfed 6-23 month old",
"Minimum meal frequency",
"Mean number of food groups consumed",
"Minimum dietary diversity",
"Minimum adequate diet for breastfed children",
"Minimum adequate diet for non-breastfed children",
"Minimum adequate diet"),
state = "Kayah")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.