Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

indefinite

Add Indefinite Article


Description

Adds an initial indefinite article "a" or "an" to a numerical object expressed either as digits or as words in the result. The capitalized form, Initial, capitalizes the initial letter: "An" or "A".

Usage

indefinite(n, ...)

## S3 method for class 'numeric'
indefinite(n, words = TRUE, ...)

## S3 method for class 'english'
indefinite(n, words = TRUE, ...)

## S3 method for class 'ordinal'
indefinite(n, ...)

## S3 method for class 'character'
indefinite(n, ...)

Indefinite(n, ...)

Arguments

n

either a numeric vector or a ordinal character string.

...

Extra arguments, currently ignored

words

logical: should the numbers be expressed as words (TRUE) or digits (FALSE)?

Value

A character string vector with an article prepended, either capitalized or not.

Examples

indefinite(1:12)
paste0(Indefinite(1:12, FALSE), "-stage process")
cat(paste(Indefinite(ordinal(1:10)), " point is ...\n", sep = ""))

english

Translate Integers into English

v1.2-5
GPL-2
Authors
John Fox, Bill Venables, Anthony Damico and Anne Pier Salverda
Initial release
2020-01-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.