english (version 1.1-4)

words: Convert integers to words as character strings

Description

Convenience functions mainly for use in R markdown inline code inserts. words converts an numeric or english object to character strings; Words does the same job, but additionally changes the first letter of the output strings to upper case, as needed if the R markdown code insert begins a sentence.

Usage

words(x) ## lower case
Words(x) ## capitalized initial letter

Arguments

x

Either a numerical vector of integers or an english object.

Value

A character string vector representing the input numerical object in English words.

Details

Convenience functions only. Intended primarily for use in R markdown code inserts.

See Also

as.character.english

Examples

Run this code
# NOT RUN {
  paste("The Duke of York had", words(10006), "men")
  paste("How many?", Words(10006))
# }

Run the code above in your browser using DataLab