calendar_recode: Recode Data - DHS Calendar Similar to VLOOKUP in Excel, but...

Description Usage Arguments Value Examples

View source: R/calendar_recode.R

Description

Recode Data - DHS Calendar Similar to VLOOKUP in Excel, but by default designed for DHS calendar codes

Usage

1
2
3
4
5
6
calendar_recode(
  x,
  recodebook = DHScalendR::dhs_calendar_codebook,
  code = "Recode",
  recoding = "Meaning"
)

Arguments

x

is a vector of encoded data

recodebook

is a data frame containings information about code

code

name column of recodebook with the code of x (character)

recoding

name column of recodebook with meaning of the code (character)

Value

recoded vector x

Examples

1
2
events <- c("0","0","P","P","T","A","A", NA, "Wrong_CodeX", "3","3")
calendar_recode(events)

trottieralex/DHScalendR documentation built on March 12, 2020, 3:05 a.m.