numberize {numberize} | R Documentation |
Convert a vector string of spelled numbers in a supported language to its numeric equivalent.
Description
The range of words supported is between zero and nine hundred and ninety nine trillion, nine hundred and ninety nine billion, nine hundred and ninety nine million, nine hundred and ninety nine thousand, nine hundred and ninety nine
Usage
numberize(text, lang = c("en", "fr", "es"))
Arguments
text |
String vector of spelled numbers in a supported language. |
lang |
The text's language. Currently one of |
Value
A numeric vector.
Examples
# convert to numbers a scalar
numberize("five hundred and thirty eight")
# convert a vector of values
numberize(c("dix", "soixante-cinq", "deux mille vingt-quatre"), lang = "fr")
[Package numberize version 1.0.0 Index]