R/clean_numeric.R
clean_numeric.Rd
Replace missing codes (e.g., 777, 888, 999) with NAs in a numeric variable
clean_numeric(x, NA_codes = c(777, 888, 999, extra_codes), extra_codes = NULL)
a numeric vector
numeric values that should be turned into to NAs
codes besides 777, 888, 999 to turn into NAs; has no effect if the NA_codes argument is changed from default by the user.
NA_codes
a numeric vector corresponding to x
x