-[ background ]-
When I recently posted some of my Turbo Pascal Stuff, I found an incomplete program that was supposed to do this. I was active on BBSes and, though I don’t recall the reason, I wanted a way to determine the possible words spelled by the BBS phone numbers (and/or how to determine what phone numbers correspond to words/phrases). I never got around to finishing the second part (numbers to letters) in Turbo Pascal, though.
I decided to create this functionality in R for three reasons:
-[ telephone keypad ]-
For purposes of this package, the mapping of numbers to letters on a telephone’s keypad are as follows:
Default behavior - if parameter qz is omitted (or has a value other than 0):
Alternate behavior - if parameter qz = 0:
-[ installation ]-
install.packages("devtools") library(devtools) install_github("scumdogsteev/phonenumber") library(phonenumber)
-[ functions ]-
phonenumber consists of two functions (that are not limited to any standard length or format of telephone numbers):
Both functions convert non-alphanumeric characters to dashes (-) as that is the character that usually separates parts of a phone number.
-[ examples ]-
string <- "Texas" letterToNumber(string) #>  "83927"
string <- "22" numberToLetter(string) #>  "AA" "AB" "AC" "BA" "BB" "BC" "CA" "CB" "CC"
-[ license ]-
For no particular reason, versions of phonenumber will be named after things from the Terminator universe.
-[ download / install r package ]-