missing_to_cat: Convert missing values to categorical variables
Description
Turn <NA> in categorical variables into "(Missing)";
numeric variables will be converted to categorical variables where numeric
values as "(Observed)" and NA as "(Missing)".
Usage
missing_to_cat(data, vars, names = NULL)
Value
original dataframe containing new columns of the converted variables
for the missing values with tidyverse code attached
Arguments
data
a dataframe with the columns to convert
its missing values into categorical
vars
a character vector of the variables in data
for conversion of missing values