cardinal | R Documentation |
Convert numbers to cardinal character vectors (one, two, three)
cardinal(x, max_n = Inf, negative = "negative", ...) nom_card(x, max_n = Inf, negative = "negative", ...)
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
|
A character vector of the same length as x
Decimal components of x
are automatically converted to fractions by
fracture::frac_mat()
.
uncardinal()
to convert character vectors to numbers
Other number names:
adverbial()
,
collective()
,
denominator()
,
numerator()
,
ordinal()
,
ratio()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.