h_fmt_num: Format Numeric Data

View source: R/utils.R

h_fmt_numR Documentation

Format Numeric Data

Description

[Experimental]

Help function to format numeric data with formatC function.

Usage

h_fmt_num(x, digits, width = digits + 4)

Arguments

x

(numeric)
numeric input.

digits

(integer)
the desired number of digits after the decimal point (format = "f").

width

(integer)
the total field width.

Value

A character object with specific digits and width.

See Also

formatC()

Examples

h_fmt_num(pi * 10^(-2:2), digits = 2, width = 6)

mcradds documentation built on Sept. 11, 2024, 5:33 p.m.