ordinal {nombre} | R Documentation |
Convert numbers to ordinal character vectors (first, second, third)
Description
Adds ordinal suffixes to numbers (or a character vector of number-like
words).
Converts numeric vectors to cardinal numbers before adding prefixes unless
cardinal
is FALSE
.
Usage
ordinal(x, cardinal = TRUE, ...)
nom_ord(x, cardinal = TRUE, ...)
Arguments
x |
A numeric or character vector. |
cardinal |
Whether to convert a numeric vector with |
... |
Further arguments passed to |
Value
A character vector of the same length as x
See Also
Other number names:
adverbial()
,
cardinal()
,
collective()
,
denominator()
,
numerator()
,
ratio()
Examples
nom_ord(2)
nom_ord(1:10)
nom_ord(525600)
nom_ord(1:10, cardinal = FALSE)
nom_ord(5:15, max_n = 10)
nom_ord(c("n", "dozen", "umpteen", "eleventy", "one zillion"))
nom_ord(9 + 3/4)
[Package nombre version 0.4.1 Index]