tidy_phone: Clean up phone numbers

Description Usage Arguments

Description

Remove any non-numerals from a phone number and shorten it to a fixed length

Usage

1
tidy_phone(phone, length = 10, side = "right")

Arguments

phone

character vector of phone numbers

length

length to truncate number to (chopping off numerals from the right)

side

which side of the string do you want to take? if a lot of phone numbers have country codes which you can remove, then taking the rightmost digits (side = "right") will work


tarakc02/preprocessr documentation built on May 31, 2019, 3:55 a.m.