ordinal_friendly(c(0, 1, 2, 3, NA, NaN, Inf, -Inf))
ordinal_friendly(10^10)
# Specify the translations of "special" numbers
ordinal_friendly(0, zero = "noneth")
# Modify the output formatting
ordinal_friendly(1234)
ordinal_friendly(1234, and = TRUE)
ordinal_friendly(1234, hyphenate = FALSE)
# Input validation
try(ordinal_friendly_safe(0.5))
Run the code above in your browser using DataLab