R to convert numeric (23) to English ("twenty three")

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"
+3
source share
3 answers

Now the package english:

library(english)

english(5)
english(23)

## > english(23)
## [1] twenty three
## > english(23)
## [1] twenty three
+4
source

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

+6
source

number2words, " ?" The Volume 5/1, May 2005 RNews ( ) - , .

+4

All Articles