README.md

toOrdinal

R-CMD-check AppVeyor Build Status CRAN_Status_Badge Development Version License Join the chat at https://gitter.im/CenterForAssessment/toOrdinal

Overview

The R package toOrdinal contains a single function toOrdinal that converts a cardinal number (e.g., 9) into its ordinal counterpart (e.g., 9th). Because such conversions are language specific, the conversions are specific to a supported language. At present, the package implements English, French, German, Spanish, and Swedish. For example,

Installation

From CRAN

To install the latest stable release of toOrdinal from CRAN

> install.packages("toOrdinal")

From Github

To install the development release of toOrdinal from GitHub:

> devtools::install_github("CenterForAssessment/toOrdinal")

Usage

> toOrdinal(5)
[1] "5th"

> toOrdinal(5, language="German")
[1] "5te"

> toOrdinal(5, language="French")
[1] "5e"

> toOrdinal(5, language="Spanish")
[1] "5.ยบ"

> toOrdinal(5, language="Swedish")
1] "5:e"

Resources

Contributors

The toOrdinal Package is crafted with :heart: by:

I love feedback and am happy to answer questions. Feel free to clone and make a pull request with the specifications for other languages.



CenterForAssessment/toOrdinal documentation built on Oct. 27, 2023, 12:17 p.m.