nth_friendly(c(0, 1, 2, 3, 22, 1001, NA, NaN, Inf, -Inf))
# Specify the translations of "special" numbers
nth_friendly(c(1, 0, NA), zero = "noneth", na = "?")
# Use `bigmark` to add or remove commas
nth_friendly(1234, bigmark = TRUE)
nth_friendly(1234, bigmark = FALSE)
# Input validation
try(nth_friendly_safe(1234, bigmark = ","))
Run the code above in your browser using DataLab