create_weighted_anthro: Function to create weighted anthropometric indicator results...

Description Usage Arguments Value Examples

View source: R/24-create_tables.R

Description

Function to create weighted anthropometric indicator results tables

Usage

1
create_weighted_anthro(df, sex = FALSE, vars, labs, state, digits = NULL)

Arguments

df

A recoded data.frame of indicators

sex

Logical. Should results be disaggregated by sex? Default is FALSE.

vars

Variable names for anthropometric indicator/s to create a results table for

labs

Variable labels for anthropometric 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.

Value

A data.frame of anthropometric indicator results for each state in total and disaggregated by urban, rural and hard-to-reach areas

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Recode stunting indicators
canthro  <- recode_anthro(df = create_canthro(df = childAnthro, x = anthroDF))

create_weighted_anthro(df = canthro,
                       vars = c("haz", "global.haz", "moderate.haz", "severe.haz"),
                       labs = c("Mean height-for-age z-score",
                                "Global stunting/stuntedness",
                                "Moderate stunting/stuntedness",
                                "Severe stunting/stuntedness"),
                       state = "Kayah")

create_weighted_anthro(df = canthro, sex = TRUE,
                       vars = c("haz", "global.haz", "moderate.haz", "severe.haz"),
                       labs = c("Mean height-for-age z-score",
                                "Global stunting/stuntedness",
                                "Moderate stunting/stuntedness",
                                "Severe stunting/stuntedness"),
                       state = "Kayah")

validmeasures/myanmarMCCTdata documentation built on March 29, 2020, 10:27 p.m.