Skip to contents

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 c("en", "fr", "es"). Default is "en"

Value

A numeric vector.

Examples

# convert to numbers a scalar
numberize("five hundred and thirty eight")
#> [1] 538

# convert a vector of values
numberize(c("dix", "soixante-cinq", "deux mille vingt-quatre"), lang = "fr")
#> [1]   10   65 2024