Comma: Faster version of 'scales::comma'

View source: R/Comma.R

CommaR Documentation

Faster version of scales::comma

Description

Faster version of scales::comma

Usage

Comma(x, digits = 0L, big.mark = c(",", " ", "'", "_", "~", "\"", "/"))

Arguments

x

A numeric vector.

digits

An integer, similar to round.

big.mark

A single character, the thousands separator.

Value

Similar to prettyNum(round(x, digits), big.mark = ',') but rounds down and -1 < x < 0 will output "-0".


hutilscpp documentation built on Oct. 11, 2023, 9:06 a.m.