ordinal: Ordinal Numbers

Description Usage Arguments Value Examples

View source: R/ordinal.R

Description

Generates character strings of the ordinal version of numbers in English words.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
ordinal(x, ...)

## S3 method for class 'english'
ordinal(x, ...)

## S3 method for class 'numeric'
ordinal(x, ...)

## S3 method for class 'character'
ordinal(x, ...)

## S3 method for class 'ordinal'
print(x, ...)

Arguments

x

A numeric vector, usually integer, or an object of class "ordinal"

...

Ignored. Included only for compatibility.

Value

A character string vector of ordinal versions of the number, with S3 class "ordinal"

Examples

1
ordinal(1:12)

Example output

 [1] first    second   third    fourth   fifth    sixth    seventh  eighth  
 [9] ninth    tenth    eleventh twelfth 

english documentation built on Aug. 21, 2021, 9:07 a.m.