commas: Format large values to include comma separators and rounding

Description Usage Arguments Value Examples

View source: R/CommaValues.R

Description

Format large values to include comma separators and rounding

Usage

1
commas(x, scinot = FALSE, digits = 2)

Arguments

x

numerical value for which to add comma formatting to

scinot

logical value to permit scientific notation in output value. Default is _FALSE_

Value

A numerical value rounded to the nearest 2 decimal places

Examples

1
2
3
4
commas(12345610)
commas(12345610, TRUE)
commas(12345610.09324500, TRUE, digits = 2)
commas(0.123456)

towananalytics/tatools documentation built on Jan. 24, 2022, 7:31 p.m.