num_accounting: Numeric vector with accounting format

View source: R/num_accounting.R

num_accountingR Documentation

Numeric vector with accounting format

Description

Formats numbers with a thousand separator and two digits after the decimal point.

Usage

num_accounting(x, digits = 2L, format = "f", big.mark = ",", ...)

parse_accounting(
  x,
  digits = max(get_digits(x)),
  format = "f",
  big.mark = ",",
  ...
)

Arguments

x

a numeric vector.

digits

an integer to indicate the number of digits of the percentage string.

format

format type passed to formatC().

big.mark

thousands separator

...

additional parameters passed to formattable().

See Also

Other numeric vectors: num_comma(), num_currency(), num_digits(), num_percent(), num_scientific()

Examples

num_accounting(15320)
num_accounting(-12500)
num_accounting(c(1200, -3500, 2600), format = "d")
parse_accounting(c("123,23.50", "(123.243)"))

renkun-ken/formattable documentation built on Dec. 7, 2024, 10:19 p.m.