Skip to contents

Format numbers as currency, rounding values to dollars or cents using a convenient heuristic.

Usage

euros(x, big.mark = big_mark(), decimal.mark = dec_mark(), ...)

dollars(x, big.mark = big_mark(), decimal.mark = dec_mark(), ...)

Arguments

x

values

big.mark

thousands separator, defaults to big_mark()

decimal.mark

decimal mark, defaults to dec_mark()

...

any argument to give to the geom. This will override automatically-set settings for the geom.

Examples

if (FALSE) { # \dontrun{
profit <- data.frame(group = LETTERS[1:4],
                     profit = runif(4, 10000, 25000))

profit |>
  plot2(y.labels = euros,
        datalabels = FALSE)
        
profit |>
  plot2(y.labels = euros,
        datalabels.format = euros)
} # }