Learn R Programming

pixr (version 0.1.0)

format_brl: Format Currency Value

Description

Formats a numeric value as Brazilian Real (BRL) currency.

Usage

format_brl(x, prefix = TRUE, decimal_mark = ",", big_mark = ".")

Value

A character vector with formatted currency values.

Arguments

x

Numeric vector.

prefix

Logical; if TRUE (default), includes "R$" prefix.

decimal_mark

Character to use as decimal separator.

big_mark

Character to use as thousands separator.

Examples

Run this code
format_brl(1234567.89)
format_brl(c(1000, 2000, 3000))

Run the code above in your browser using DataLab