This function takes a numeric vector and formats it by inserting commas as thousands separators, making large numbers easier to read.
Examples
numbers <- c(1000, 50000, 1234567)
pretty_number(numbers)
#> [1] "1,000" "50,000" "1,234,567"
This function takes a numeric vector and formats it by inserting commas as thousands separators, making large numbers easier to read.
numbers <- c(1000, 50000, 1234567)
pretty_number(numbers)
#> [1] "1,000" "50,000" "1,234,567"