num_as_ordinal(1:4)
num_as_ordinal(10:14) # all with "th"
num_as_ordinal(110:114) # all with "th"
num_as_ordinal(120:124) # 4 different suffixes
num_as_ordinal(1:15, sep = "-") # using sep
# Note special cases:
num_as_ordinal(NA)
num_as_ordinal("1")
num_as_ordinal(Sys.Date())
num_as_ordinal(Sys.time())
num_as_ordinal(seq(1.99, 2.14, by = .01))
Run the code above in your browser using DataLab