This function is in experimental development. It currently only supports English cardinal integers or character vectors produced by one of nombre's functions.

uncardinal(x)

nom_uncard(x)

Arguments

x

A character vector of the cardinal names of numbers

Value

A numeric vector the same length as n. NAs will be produced for numbers with fractions or decimals or non-cardinal numbers (e.g. ordinals).

See also

cardinal() to convert numeric vectors to number names

Examples

uncardinal("one")
#> [1] 1
uncardinal("negative one hundred fifty-seven")
#> [1] -157
uncardinal( c( "twenty-five", "one million two hundred thirty-four thousand five hundred sixty-seven" ) )
#> [1] 25 1234567
uncardinal("infinity")
#> [1] Inf
card <- cardinal(25) uncardinal(card)
#> [1] 25
ord <- ordinal(25) uncardinal(ord)
#> [1] 25