ordinal | R Documentation |
Returns the appropriate abbreviation in English for an ordinal number
(for example ordinal(5)
is "5th"
).
ordinal(k)
ordinalsuffix(k)
k |
An integer or vector of integers. |
ordinal(k)
returns a character string representing the
k
th ordinal number. ordinalsuffix(k)
determines the
appropriate suffix.
The suffix can be either "st"
(abbreviating
first), "nd"
(abbreviating second),
"rd"
(abbreviating third) or
"th"
(for all other ordinal numbers fourth
,
fifth
, etc).
A character string or character vector of the same length as k
.
.
articlebeforenumber
ordinal(1:7)
cat(paste("Happy", ordinal(21), "Birthday"), fill=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.