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".

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)
#>  [1] "a one"     "a two"     "a three"   "a four"    "a five"    "a six"    
#>  [7] "a seven"   "an eight"  "a nine"    "a ten"     "an eleven" "a twelve" 
paste0(Indefinite(1:12, FALSE), "-stage process")
#>  [1] "A 1-stage process"   "A 2-stage process"   "A 3-stage process"  
#>  [4] "A 4-stage process"   "A 5-stage process"   "A 6-stage process"  
#>  [7] "A 7-stage process"   "An 8-stage process"  "A 9-stage process"  
#> [10] "A 10-stage process"  "An 11-stage process" "A 12-stage process" 
cat(paste(Indefinite(ordinal(1:10)), " point is ...\n", sep = ""))
#> A first point is ...
#>  A second point is ...
#>  A third point is ...
#>  A fourth point is ...
#>  A fifth point is ...
#>  A sixth point is ...
#>  A seventh point is ...
#>  An eighth point is ...
#>  A ninth point is ...
#>  A tenth point is ...