Learn R Programming

dfeR (version 1.0.1)

comma_sep: Comma separate

Description

Adds separating commas to big numbers. If a value is not numeric it will return the value unchanged and as a string.

Usage

comma_sep(number, nsmall = 0L)

Value

string

Arguments

number

number to be comma separated

nsmall

minimum number of digits to the right of the decimal point

Examples

Run this code
comma_sep(100)
comma_sep(1000)
comma_sep(3567000)

Run the code above in your browser using DataLab