Learn R Programming

chevron (version 0.2.7)

h_format_dec: Decimal formatting

Description

Decimal formatting

Usage

h_format_dec(digits, format, ne = NULL)

Value

function formatting numbers with the defined format.

Arguments

digits

(integer) number of digits.

format

(string) describing how the numbers should be formatted following the sprintf syntax.

ne

(string) that should replace actual value. If NULL, no replacement is performed.

Examples

Run this code
fun <- h_format_dec(c(1, 1), "%s - %s")
fun(c(123, 567.89))

Run the code above in your browser using DataLab