format_number: format_number

View source: R/dfSummary.R

format_numberR Documentation

format_number

Description

Used internally (not exported) to apply all relevant formatting. It is documented here only because it can be used when setting the dfSummary.custom.1 and dfSummary.custom.1 options.

Usage

format_number(x, round.digits, ...)

Arguments

x

A numerical value to be formatted.

round.digits

Numerical. Number of decimals to show. Used to define both digits and nsmall when calling format.

...

Any other formatting instruction that is compatible with format.

Examples


## Not run: 
format_number(IQR(column_data, na.rm = TRUE), round.digits)
format_number(IQR(column_data, na.rm = TRUE), decimal.mark = ",")

## End(Not run)

dcomtois/summarytools documentation built on Nov. 16, 2023, 5:29 p.m.