Title: | Compact Standard for Australian Phone Numbers |
---|---|
Description: | Phone numbers are often represented as strings because there is no obvious and suitable native representation for them. This leads to high memory use and a lack of standard representation. The package provides integer representation of Australian phone numbers with optional raw vector calling code. The package name is an extension of 'au' and 'ph'. |
Authors: | Hugh Parsonage [aut, cre] |
Maintainer: | Hugh Parsonage <[email protected]> |
License: | GPL-2 |
Version: | 0.3.2 |
Built: | 2024-10-31 21:23:07 UTC |
Source: | CRAN |
Standardize Australian phone numbers
dauphin_mobile(mob, ignore_calling_code = NA) dauphin_landline( landline, default_area_code = getOption("daiphin.default_area_code", 1L) ) dauphin_mobile_landline( mob, landline, default_area_code = getOption("dauphin.default_area_code", 1L) ) ## S3 method for class 'dauphin_mobile' print(x, ...)
dauphin_mobile(mob, ignore_calling_code = NA) dauphin_landline( landline, default_area_code = getOption("daiphin.default_area_code", 1L) ) dauphin_mobile_landline( mob, landline, default_area_code = getOption("dauphin.default_area_code", 1L) ) ## S3 method for class 'dauphin_mobile' print(x, ...)
mob , landline
|
Character vectors in which mobile numbers and landline numbers are expected. |
ignore_calling_code |
|
default_area_code |
An integer between 1 and 10 giving, for
landline numbers with 8 digits, what area code should be set. By default,
it is |
x |
A vector, generally a character vector, in which phone numbers are expected. |
... |
Arguments passed to other methods. |
Mobile phone numbers or landline numbers are represented as integer vectors. International
calling prefixes extend the number beyond the representation of signed
integers. We use raw
vectors for the international prefix, if required.
If ignore_calling_code = TRUE
, the integer vector is returned.
Elements of x
for which the mobile phone number could not be
extracted map to NA_integer_
in the result.
If ignore_calling_code = FALSE
, then a list is returned. The second element
of the list is the calling prefix.
If ignore_calling_code = NA
then it is set to TRUE
if x
appears to have international prefixes already.
dauphin_mobile
An integer vector, the integer representation of the mobile phone. If the calling code is required or requested, a list of two vectors is returned, with the second element a raw vector with a representation of the corresponding number.
dauphin_landline
An integer vector, the integer representation of the landline.
dauphin_mobile_landline
A list of two vectors with the mobile and landline vectors respectively, even if the character vectors passed are in the wrong order (or partially in the wrong order). Useful if some of the entries are in the wrong place.
dauphin_mobile("0400 123 456") dauphin_mobile("+61400123456", ignore_calling_code = FALSE) dauphin_mobile_landline("0424 123 456", "03 1234 5678") dauphin_mobile_landline(c("0424 123 456", "03 1234 5678"), c(NA, "0424 123 456"))
dauphin_mobile("0400 123 456") dauphin_mobile("+61400123456", ignore_calling_code = FALSE) dauphin_mobile_landline("0424 123 456", "03 1234 5678") dauphin_mobile_landline(c("0424 123 456", "03 1234 5678"), c(NA, "0424 123 456"))