ntimes_friendly(c(0, 1, 2, 3, 22, 1001, NA, NaN, Inf, -Inf))
# Specify the translations of "special" numbers
ntimes_friendly(c(3, NA), three = "thrice", na = "some times")
# Modify the output formatting
ntimes_friendly(5678)
ntimes_friendly(5678, and = TRUE)
ntimes_friendly(5678, hyphenate = FALSE)
# Input validation
try(ntimes_friendly_safe(1234, and = " - "))
Run the code above in your browser using DataLab