articlebeforenumber | R Documentation |
Determines the indefinite article (an or a) which should precede a given number, if the number is read out in English.
articlebeforenumber(k, teenhundreds=FALSE)
k |
A single number. |
teenhundreds |
Logical value specifying that (for example) 1800 should be read as “eighteen hundred” instead of “one thousand eight hundred”. See Details. |
This function applies the rule that,
if the English language word or phrase for the number k
begins with a vowel, then it should be preceded by an,
and otherwise by a.
If teenhundreds=FALSE
(the default),
the numbers 1100 and 1800 will be read as
‘one thousand one hundred’ and ‘one thousand eight hundred’,
and the indefinite article will be a.
However if teenhundreds=TRUE
, the numbers 1100 and 1800
be read as ‘eleven hundred’ and ‘eighteen hundred’
and the indefinite article will be an.
One of the character strings "an"
or "a"
.
.
ordinal
f <- function(k) cat(paste(articlebeforenumber(k),
paste0(k, "-fold"),
"increase\n"))
f(8)
f(18)
f(28)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.