comma_format

0th

Percentile

Comma formatter: format number with commas separating thousands.

Comma formatter: format number with commas separating thousands.

Usage
comma_format(...)
comma(x, ...)
Arguments
...
other arguments passed on to format
x
a numeric vector to format
Value

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

Aliases
  • comma
  • comma_format
Examples
library(scales) comma_format()(c(1, 1e3, 2000, 1e6)) comma_format(digits = 9)(c(1, 1e3, 2000, 1e6)) comma(c(1, 1e3, 2000, 1e6)) # If you're European you can switch . and , with the more general # format_format point <- format_format(big.mark = ".", decimal.mark = ",", scientific = FALSE) point(c(1, 1e3, 2000, 1e6)) point(c(1, 1.021, 1000.01))
Documentation reproduced from package scales, version 0.4.1, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.