english (version 1.2-5)

as.english: "_PACKAGE" Numbers in Englis Words

Description

Converts numerical vectors into object that display as English words

Usage

as.english(x, ...)

english(x, ...)

# S3 method for default english(x, ...)

# S3 method for numeric english(x, UK, ...)

# S3 method for english as.numeric(x, ...)

# S3 method for english print(x, ...)

# S3 method for english rep(x, ...)

# S3 method for english [(x, i)

# S3 method for english format(x, ...)

# S3 method for english as.character(x, ...)

# S3 method for english sort(x, decreasing = FALSE, ...)

Arguments

x

A numerical vector, usually integer.

...

Additional arguments passed on, currently mostly ignored

UK

Logical, Use the UK (English) style (TRUE) or the USA (American) style (FALSE). The default can be set as options(english.UK = TRUE); if unset, a suitable style is guessed from the user's current locale.

i

Index vector of any kind

decreasing

Logical: should the sorting be in decreasing order?

Value

A numerical object that can be printed as English words, or coerced to character as English words

Examples

Run this code
# NOT RUN {
english(10000) + (-5):5
set.seed(123)
(jumble <- english(sample(1:20)))
sort(jumble)
(x <- english(sample(1:100, 10)))
sort(x)
toupper(english(1:10))
## For mothers of small children:
cat(paste("This is the", ordinal(1:5), "time I've told you!"), sep = "\n")
# }

Run the code above in your browser using DataLab