pillar (version 0.0.0.9000)

format_decimal: Format numbers in decimal notation

Description

This formatting system is designed to make it as easy as possible to compare columns of numbers. Significant digits are coloured black or red (for positive and negative numbers) and non-significant digits are coloured in paler gray.

Usage

format_decimal(x, sigfig = 3, ...)

Arguments

x

A numeric vector

sigfig

Number of signficiant figures to display.

...

Ignored

Value

A list with at least the following elements:

  • neg: negative sign or space, if needed

  • lhs: whole number

  • dec: decimal point, if needed

  • rhs: remainder of number