format_num: Internal Function: Format numbers for printing

Description Usage Arguments See Also Examples

View source: R/prepare.R

Description

Helper function for use in print_dat

Usage

1
format_num(x, digits = 1, big.mark = ",")

Arguments

x

vector to format

digits

number of digits for rounding

big.mark

character: separator between 1000s

See Also

Other internal helper functions: calc_churn, pct_round, print_dat

Examples

1
2
3
4
5
6
format_num(c(2005, 2006, NA))
format_num(c(100000, 131000, 150000, NA))
format_num(c(100000, 131000, 150000, NA), big.mark = "")
format_num(c(27.456, 25.234, 30.679, NA))
format_num(c(27, 25, 30))
format_num(c("6.2%", "13.9%", "8.2%", NA))

southwick-associates/salic documentation built on Nov. 5, 2019, 9:13 a.m.