fix_mobile: Fix mobile numbers

View source: R/fixmob.R

fix_mobileR Documentation

Fix mobile numbers

Description

Fixes up local mobile phone numbers to a uniform text format.

Usage

fix_mobile(x)

Arguments

x

A character vector of numerical strings.

Details

This format is specific to that used in a given location - for now the function is useful only for Nigeria mobile numbers, which come in the format expressed by the regex pattern "^0[7-9][0-1][0-9]{8}$".

Value

The updated vector, usually the column of a data frame.

Note

There is an option for producing warnings on any mobile number entries that may have been removed from the vector, by setting the option verbose to TRUE.


naijR documentation built on Aug. 8, 2023, 5:13 p.m.