Learn R Programming

wpa (version 1.9.0)

comma: Add comma separator for thousands

Description

Takes a numeric value and returns a character value which is rounded to the whole number, and adds a comma separator at the thousands. A convenient wrapper function around round() and format().

Usage

comma(x)

Value

Returns a formatted string.

Arguments

x

A numeric value