ordinal_format {scales} | R Documentation |
ordinal_english()
, ordinal_french()
and ordinal_spanish()
provide
rules for computing ordinal indicators in English, French and Spanish
respectively.
ordinal_format(prefix = "", suffix = "", big.mark = " ", rules = ordinal_english(), ...) ordinal(x, prefix = "", suffix = "", big.mark = " ", rules = ordinal_english(), ...) ordinal_english() ordinal_french() ordinal_spanish()
prefix, suffix |
Symbols to display before and after value. |
big.mark |
Character used between every 3 digits to separate thousands. |
rules |
Named list of regular expressions, match in order. Name gives suffix, and value specifies which numbers to match. |
... |
Other arguments passed on to |
x |
A numeric vector of positive values to format. |
A function with single parameter x
, a numeric vector, that
returns a character vector
Values in x
will be rounded before formating.
ordinal_format()(1:10) ordinal(1:10) # Custom rules for French french <- list( er = "^1$", nd = "^2$", e = "." ) ordinal(1:20, rules = french) # You can also use directly ordinal(1:20, rules = ordinal_french())