scales (version 0.3.0)

ordinal_format: Ordinal formatter: add ordinal suffixes (-st, -nd, -rd, -th) to numbers.

Description

Ordinal formatter: add ordinal suffixes (-st, -nd, -rd, -th) to numbers.

Usage

ordinal_format(x)

ordinal(x)

Arguments

x
a numeric vector to format

Value

  • a function with single paramater x, a numeric vector, that returns a character vector

Examples

Run this code
ordinal_format()(1:10)
ordinal(1:10)

Run the code above in your browser using DataCamp Workspace