reflag: Reflag variables

reflagR Documentation

Reflag variables

Description

This function allows you to change variable name ex: "M" to "Male".

Usage

reflag(
  dat,
  var,
  orignal.flag,
  new.flag = NULL,
  newvar = NULL,
  to.factor = T,
  missing = c("", ".", "NA", NA)
)

Arguments

dat

data frame

var

Vector to be changed

orignal.flag

Original names ex:"M","F"

new.flag

New names ex:c"Male","Female"

newvar

Create new vector


leonpheng/lhtool2 documentation built on April 13, 2025, 5:42 p.m.