data(efc)
table(efc$e42dep, exclude = NULL)
table(replace_na(efc$e42dep, 99), exclude = NULL)
dummy <- list(efc$c82cop1, efc$c83cop2, efc$c84cop3)
# show original distribution
lapply(dummy, table, exclude = NULL)
# show variables, NA's replaced with 99
lapply(replace_na(dummy, 99), table, exclude = NULL)
Run the code above in your browser using DataLab