recode_iycf: Function to recode IYCF counselling coverage indicators

Description Usage Arguments Value Examples

View source: R/06-recode_iycf.R

Description

Function to recode IYCF counselling coverage indicators

Usage

1
2
3
4
5
recode_iycf(
  df,
  core.columns = c("spid", "cid", "did", "eid", "motherID", "m2"),
  ls = NULL
)

Arguments

df

A coverage data.frame collected for the Liberia Coverage Survey

core.columns

A vector of variable names to include in resulting data.frame

ls

A list of thematically named string pattern vectors to use for searching and organising 'others' responses for icf2a

Value

A data.frame of IYCF counselling coverage indicators

Examples

1
2
3
4
5
6
icf2e <- c("delivery", "health", "hospital") # Did not go to hospital
icf2f <- c("Doctor", "invited", "talk", "counselling") # No one told me about it/not invited
icf2g <- c("time") # No time
ls <- list(icf2e, icf2f, icf2g)
names(ls) <- paste("icf2", letters[5:7], sep = "")
recode_iycf(df = coverageData1.r2, ls = ls)

validmeasures/liberiaData documentation built on Dec. 2, 2020, 3:32 a.m.