thousands_format: Thousands formatter: format number with commas separating the...

View source: R/thousands.R

thousands_formatR Documentation

Thousands formatter: format number with commas separating the number thousands and suffixed with a k.

Description

Based heavily on the scales work by Hadley

Usage

thousands_format()

thousands(x)

Arguments

x

a numeric vector to format

Value

a function with single paramater x, a numeric vector, that returns a character vector

See Also

Other helper: CJ.dt(), convertToXML(), generatePDF(), pounds_format(), sanitise(), wordwrap()

Examples

thousands_format()(c(1, 1e3, 2000, 1e6))
thousands_format()(c(1, 1e3, 2000, 1e6))
thousands(c(1, 1e3, 2000, 1e6))

optiRum documentation built on May 5, 2022, 1:05 a.m.