Skip to contents

This function formats a number to make it more readable. Large numbers are expressed in millions or billions and small numbers are not rounded.

Usage

strg_pretty_num(vector, rnd = 0)

Arguments

vector

A numeric vector to make pretty.

rnd

The number of digits to round to.

Value

The pretty number string.

Examples

if (FALSE) { # \dontrun{
strg_pretty_num(1234)
strg_pretty_num(12345678)
strg_pretty_num(-987654321, 2)

} # }