set_formatter_money | R Documentation |
Set money formatter
set_formatter_money(
widget,
column,
decimal = c(",", "."),
thousand = c(".", ","),
symbol = "$",
symbol_after = "p",
negative_sign = "-",
precision = FALSE,
hoz_align = "left"
)
widget |
A |
column |
The name of the column the formatter is applied to. |
decimal |
(character): Symbol to represent the decimal point. |
thousand |
(character, bool): Symbol to represent the thousands separator.
Set to |
symbol |
(character): The currency symbol. |
symbol_after |
(bool): Whether to put the symbol after the number. |
negative_sign |
(character, bool): The sign to show in front of the number.
Set to |
precision |
(integer, bool): The number of decimals to display.
Set to |
hoz_align |
(character): The horizontal alignment of the column. |
The updated tabulator()
HTML widget
data <- data.frame(
Account_Number = c(
123456,
345667,
234567,
234566
),
Account_Balance = c(100, -50, 200.30, -21.5)
)
tabulator(data) |>
set_formatter_money(
"Account_Balance",
symbol = "\U20AC",
symbol_after = FALSE,
hoz_align = "right"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.