format a numeric vector based on its distribution
Usage
formatNum(v, less1 = F, rmLeading0 = F)
Arguments
- v
a numeric vector
- less1
logical, FALSE; should the number of digits after formatting
be one less than the normal number of digits;
- rmLeading0
logical, TRUE; removing leading 0 for dicimals.
Examples
formatNum(1234.5)
#> [1] "1,234"