recode_vita: Function to recode vitamin A supplementation coverage...

Description Usage Arguments Value Examples

View source: R/08-recode_vita.R

Description

Function to recode vitamin A supplementation coverage indicators

Usage

1
2
3
4
5
recode_vita(
  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 vit1a

Value

A data.frame of vitamin A supplementation coverage indicators

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
ifa3d <- c("delivery", "hospital", "constantly") # Did not go to hospital
ifa3e <- c("know") # Don't know about the tablets
ifa3f <- c("any", "go") # Didn't get any tablets
ifa3g <- c("given") # Was given but never took it
ifa3h <- c("interest", "interested", "Not") # Not interested
ifa3i <- c("Reasons") # No reasons
ls1 <- list(ifa3d, ifa3e, ifa3f, ifa3g, ifa3h, ifa3i)
names(ls1) <- paste("ifa3", letters[4:9], sep = "")
recode_ifa(df = coverageData.r2, ls1 = ls1)

## End(Not run)

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