Learn R Programming

mcradds (version 1.1.1)

h_fmt_num: Format Numeric Data

Description

[Experimental]

Help function to format numeric data with formatC function.

Usage

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

Value

A character object with specific digits and width.

Arguments

x

(numeric)
numeric input.

digits

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

width

(integer)
the total field width.

See Also

Examples

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

Run the code above in your browser using DataLab