Missing Value Formatting
formatNA.Rd
Takes a numeric vector and replaces all missing codes with NA and returns a factor if the variable is categorical or a numeric variable if it's numeric.
Examples
y <- c(1:10, "Unk", 12)
formatNA(y)
#> [1] 1 2 3 4 5 6 7 8 9 10 <NA> 12
#> Levels: 1 10 12 2 3 4 5 6 7 8 9