fmt_table | R Documentation |
Automatic formatting for tables that should "just work" for most use cases. For more fine-grained control, see formatting and padding.
fmt_table(
df,
dec_dig = 1,
prop_dig = 3,
corr_dig = 3,
output = NULL,
fmt_small = TRUE,
max_value = NULL,
keep_zero = FALSE
)
df |
A data frame or tibble to be formatted for printing in output. |
dec_dig |
The number of decimal places to include for numbers, e.g.,
|
prop_dig |
The number of decimal places to include for numbers bounded
between [0,1], e.g., |
corr_dig |
The number of decimal places to include for numbers bounded
between [-1,1], e.g., |
output |
The output format of the table. One of "latex" or "html". Automatically pulled from document output type if not specified. |
fmt_small |
Indicator for replacing zero with |
max_value |
If |
keep_zero |
If |
A tibble with the same rows and columns as df
, with numbers
formatted consistently and padded for alignment when printed.
Other formatters:
formatting
,
padding
pcts <- tibble::tibble(n = 0:5, p = 0.5 * (0:5))
pcts |> fmt_table()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.