R/commaFmt.R

Defines functions commaFmt

Documented in commaFmt

#'
#'  Format a number with embedded commas
#'
#' @param x A numeric value
#' @param Number of places to right of decimal point
#' @return Formatted number (character)
#' @export
#'
commaFmt <- function(x, digits=0) {
	prettyNum(round(as.numeric(x),digits=digits), big.mark=",")
}
pteetor/tutils documentation built on April 25, 2024, 9:14 a.m.