This function cleans a RSA-911 date variable containing missing values, converting missings to 9s. If specified by the user, it additionally converts 9s to 0s.

handle_nines(x, unidentified_to_0 = TRUE)

Arguments

x

An RSA-911 variable to be cleaned, containing missings and/or 9s.

unidentified_to_0

TRUE or FALSE. Defaults to TRUE, when TRUE, variables where unidentified is represented by 9, values are converted to 0.

Value

The converted date variable.