Adds "st", "nd", "rd", or "th" suffix to integers

append_nth(x)

Arguments

x

Integer or integerish vector.

Value

A character vector with integers converted to "th"

Examples

## randomly sample ten values from 1:100 and add suffix append_nth(sample(1:100, 10))
#> [1] "9th" "83rd" "59th" "16th" "1st" "45th" "47th" "27th" "68th" "71st"