Is there a function R that converts numeric values ββto their English representation? It will work as follows:
> to.words(5) [1] "five" > to.words(23) [1] "twenty-three"
Now the package english:
english
library(english) english(5) english(23) ## > english(23) ## [1] twenty three ## > english(23) ## [1] twenty three
Here was an example function for small numbers given in R-help:
http://finzi.psych.upenn.edu/Rhelp10/2008-March/155928.html
And another (which seems more complete), published by John Fox in the 5/1 news volume R, starting on page 51. The function itself is page 53:
http://cran.r-project.org/doc/Rnews/Rnews_2005-1.pdf
number2words, " ?" The Volume 5/1, May 2005 RNews ( ) - , .