count_as_word: Convert Large Counts into Friendly Text

Description Usage Arguments Value Examples

View source: R/number.R

Description

Note - currently limited to .Machine$integer.max.

Usage

1
count_as_word(value, fmt = "%.1f")

Arguments

value

A single positive integer

fmt

Extra number formatting supplied to sprintf

Value

Returns a string with the power of a number replaced by the appropriate word.

Examples

1
2
3
count_as_word(100)
count_as_word(1000000)
count_as_word(1200000000)

Example output

[1] "100"
[1] "1.0 million"
[1] "1.2 billion"

humanize documentation built on May 2, 2019, 6:39 a.m.