R/encode_CALDFlag.R

Defines functions decode_CALDFlag encode_CALDFlag

encode_CALDFlag <- function(x) {
  c(FALSE, TRUE)[fmatch(x, c("Not CALD", "CALD"))]
}

decode_CALDFlag <- function(x) {
  fifelse(x, no = "Not CALD", yes = "CALD", "Missing")
}
HughParsonage/dhhs documentation built on Dec. 17, 2021, 11:22 p.m.