SAS imports missing data as empty strings or strings with whitespaces only. This helper function can be used to
convert these values to NAs.
Arguments
- x
(
factororcharacter)
values for which any missing values should be substituted.- empty
(
flag)
ifTRUE, empty strings get replaced byNA.- whitespaces
(
flag)
ifTRUE, strings made from only whitespaces get replaced withNA.
