Learn R Programming

english (version 1.2-0)

indefinite: Add Indefinite Article

Description

Coerce to character and add the indefinite article, namely 'an' or 'a', depending on the english form of the number involved.

Usage

indefinite(n, words = TRUE)

Arguments

n

An integer vector to receive the article.

words

A logical value: should the number be converted to English (TRUE) or left in numerical form (FALSE)?

Value

A character string vector with the appropriate article attached to each component.

Details

Used mainly in documents to allow the appropriate article to be chosen algorithmically.

See Also

See Words and words for including numbers in documents.

Examples

Run this code
# NOT RUN {
indefinite(0:11)
indefinite(0:11, FALSE)
# }

Run the code above in your browser using DataLab