powered by
Determines the indefinite article (an or a) which should precede a given number, if the number is read out in English.
a
articlebeforenumber(k)
One of the character strings "an" or "a".
"an"
"a"
A single integer.
Adrian Baddeley Adrian.Baddeley@curtin.edu.au.
This function applies the rule that, if the English word for the number k begins with a vowel, then it should be preceded by an, and otherwise by a.
k
an
ordinal
f <- function(k) cat(paste(articlebeforenumber(k), paste0(k, "-fold"), "increase\n")) f(8) f(18) f(28)
Run the code above in your browser using DataLab