Convert number to text string to the 'st, 'nd, 'rd, or 'th.

numbers2words_th(x, type = "word")

Arguments

x

The numbers that need to be converted to string.

type

How the numbers should be converted. Default = "word" (which produces "fifty-third"), but you can also select "val_th" (which produces "53rd").

Examples

numbers2words_th(x = 3, type = "val_th")
#> [1] "3rd"
numbers2words_th(x = 3, type = "word")
#> [1] "third"