powered by
Add commas to integers Add commas to integers (e.g., convert "1000000" to "1,000,000")
add_commas(x, decimals = 0)
Integer value
Number of decimal places to print
Value with commmas.
# NOT RUN { add_commas(x = c(1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000)) add_commas(x = c(1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000), decimals = 2) # }
Run the code above in your browser using DataLab