Determines the indefinite article (an or a) which should precede a given number, if the number is read out in English.
a
articlebeforenumber(k)
A single integer.
One of the character strings "an" or "a".
"an"
"a"
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
# NOT RUN { 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 DataCamp Workspace