std_phone: Standardize Phone Numbers

Description Usage Arguments Value

View source: R/std_phone.R

Description

std_phone() standardizes North American phone numbers to a 10-digit national format. Invalid or non-North American numbers are converted to NA. Note that std_phone() only check for truly valid number ranges when dialr = TRUE; otherwise, all 10-digit numbers are considered valid.

Usage

1
std_phone(x, dialr = test_dialr(), quiet = TRUE)

Arguments

x

A vector convertible to character format containing phone numbers

dialr

Should the dialr package be used to check for valid number ranges? The default uses dialr if it is installed and working.

quiet

Should the progress bar from dialr be shown? Ignored if dialr = FALSE.

Value

A character vector of standardized phone numbers


jesse-smith/covidsms documentation built on Dec. 25, 2021, 4:24 a.m.