Learn R Programming

ThomasJeffersonUniv (version 0.1.3)

phone10: 10-digit US phone number

Description

..

Usage

phone10(x, sep = "")

Value

Function phone10 returns a character

vector of nchar-10.

Arguments

x

character vector

sep

character scalar

Details

Function phone10 converts all US and Canada (+1) phone numbers to 10-digit.

Examples

Run this code
x = c(
 '+1(800)275-2273', # Apple
 '1-888-280-4331', # Amazon
 '000-000-0000'
)
phone10(x)
phone10(x, sep = '-')

Run the code above in your browser using DataLab