| dt2_format_number | R Documentation |
Add a number renderer to one or more columns using
DataTables' built-in DataTable.render.number.
dt2_format_number(
options = list(),
col_specs,
thousands = NULL,
decimal = NULL,
digits = 0,
prefix = "",
prefix_right = ""
)
options |
List of options (returned, with |
col_specs |
Column names or 1-based indices to format. |
thousands |
Thousands separator (character or |
decimal |
Decimal separator (character or |
digits |
Number of decimal places. |
prefix, prefix_right |
String to prepend/append (e.g., currency symbol). |
Modified options.
opts <- list(columns = names(iris))
opts <- dt2_format_number(opts, "Sepal.Length", thousands = ".", decimal = ",",
digits = 2, prefix = "", prefix_right = "")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.