as.english {english}R Documentation

"_PACKAGE" Numbers in Englis Words

Description

Converts numerical vectors into object that display as English words

Usage

as.english(x, ...)

english(x, ...)

## Default S3 method:
english(x, ...)

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

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

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

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

## S3 method for class 'english'
x[i]

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

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

## S3 method for class '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

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

[Package english version 1.2-6 Index]