R/SEX.R

Defines functions sex

Documented in sex

#' Classification of Male or Female (pg. 17)
#'
#' @param col Male = 1 and Female = 2
#'
#' @return It translations of the code into human friendly values.
#' @export
#'
sex <- function(col) {
  col_value <-  case.(col == 1, "MALE",
                      col == 2, "FEMALE",
                      default = "U")
  return(col_value)
}
ultramattyice/ptos documentation built on June 9, 2020, 1:24 p.m.