uncardinal {nombre} | R Documentation |
Convert cardinal character vectors to numbers
Description
This function is in experimental development. It currently only supports English cardinal integers or character vectors produced by one of nombre's functions.
Usage
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")
uncardinal("negative one hundred fifty-seven")
uncardinal(
c(
"twenty-five",
"one million two hundred thirty-four thousand five hundred sixty-seven"
)
)
uncardinal("infinity")
card <- cardinal(25)
uncardinal(card)
ord <- ordinal(25)
uncardinal(ord)
[Package nombre version 0.4.1 Index]