Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hughparsonage/dauphin
Handling Australian phone numbers
https://github.com/hughparsonage/dauphin
Last synced: 2 days ago
JSON representation
Handling Australian phone numbers
- Host: GitHub
- URL: https://github.com/hughparsonage/dauphin
- Owner: HughParsonage
- Created: 2021-07-31T23:46:53.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-07-24T06:34:34.000Z (5 months ago)
- Last Synced: 2024-07-25T07:00:52.644Z (5 months ago)
- Language: C
- Size: 85.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS.md
Awesome Lists containing this project
README
# Dauphin
Decode Australian phone numbers to integers
## Rationale
When dealing with mobile phone numbers in R they are often represented as
character vectors. However, this comes this with two problems: (1) character
vectors use excessive memory and (2) it necessitates a standard format to
filter and match them.`dauphin` attempts to solve these problems: using (32-bit) `integer` vectors
to store Australian mobile and landline numbers.```r
library(dauphin)
mobs <- c("0407 000 123", "0407000123", "61407 000 123", "+61 407 000 123")
dauphin_mobile(mobs)
```If your data contains both landline and mobile (for the same client), you can
use `dauphin_mobile_landline` to ensure they are entered in the correct field.```r
dauphin_mobile_landline(c("0412 345 678", "6532 1234"),
c("03 6533 4444", "0400 111 222"),
default_area_code = 3)
```An unexported function `format_dauphin_mobile` is also temporarily available
for a standard character format.