quantifier_friendly(c(0, 1, 2, 3, NA, NaN, Inf))
# The `negative` prefix appears after the `"all"` prefix
quantifier_friendly(-4)
# `-1` and `-2` are not translated using `one` and `two`
quantifier_friendly(c(1, 2, -1, -2), one = "the", two = "both")
# Suppress the translation of large numbers
quantifier_friendly(c(99, 1234), max_friendly = -Inf)
quantifier_friendly(c(99, 1234), max_friendly = 100)
quantifier_friendly(c(99, 1234), max_friendly = 1500)
# Specify the translations of "special" numbers
quantifier_friendly(c(1, Inf), one = "a", inf = "all")
# Arguments `one`, `two`, `inf`, etc. take precedence over `max_friendly`
quantifier_friendly(1:3, one = "one", two = "two", max_friendly = -1)
# Modify the output formatting
quantifier_friendly(1021, max_friendly = Inf)
quantifier_friendly(1021, and = TRUE, max_friendly = Inf)
quantifier_friendly(1021, hyphenate = FALSE, max_friendly = Inf)
quantifier_friendly(1021, bigmark = FALSE, max_friendly = 10)
quantifier_friendly(1021, bigmark = TRUE, max_friendly = 10)
# Input validation
try(quantifier_friendly_safe(1234, max_friendly = NA))
Run the code above in your browser using DataLab