Remove common separators, whitespace, and trailing characters from Property Index Numbers (PINs). This function is specifically formatted for PINs, which are expected to be 10 or 14-digit numbers saved as characters (PINs often have leading zeros).

pin_clean(pin)

Arguments

pin

A Property Index Number (PIN) or multiple PINs containing unnecessary whitespace or separator characters

Value

A vector of clean PINs with no whitespace or separators.

Examples


pins <- c("04-34-106-008-0000", " 14172 27008 0000")

pin_clean(pins)
#> [1] "04341060080000" "14172270080000"