cardinal {nombre} | R Documentation |
Convert numbers to cardinal character vectors (one, two, three)
Description
Convert numbers to cardinal character vectors (one, two, three)
Usage
cardinal(x, max_n = Inf, negative = "negative", ...)
nom_card(x, max_n = Inf, negative = "negative", ...)
Arguments
x |
A numeric vector |
max_n |
A numeric vector.
When the absolute value of |
negative |
A character vector to append to negative numbers.
Defaults to |
... |
Arguments passed on to
|
Value
A character vector of the same length as x
Fractions
Decimal components of x
are automatically converted to fractions by
fracture::frac_mat()
.
See Also
uncardinal()
to convert character vectors to numbers
Other number names:
adverbial()
,
collective()
,
denominator()
,
numerator()
,
ordinal()
,
ratio()
Examples
nom_card(2)
nom_card(1:10)
nom_card(2 + 4/9)
nom_card(-2)
nom_card(-2, negative = "minus")
nom_card(5:15, max_n = 10)
paste("There are", nom_card(525600), "minutes in a year.")
paste("There are", nom_card(3.72e13), "cells in the human body.")
nom_card(1 / 2^(1:4))
nom_card(1 / 2^(1:4), common_denom = TRUE)
nom_card(1 / 2^(1:4), base_10 = TRUE)
nom_card(1 / 2^(1:4), base_10 = TRUE, common_denom = TRUE)
nom_card(1 / 2:5)
nom_card(1 / 2:5, base_10 = TRUE)
nom_card(1 / 2:5, base_10 = TRUE, max_denom = 100)