tab_pct | R Documentation |
tab
Add percentages and diffs to a tab
tab_pct(
tabs,
pct = "row",
digits = NULL,
ref = c("tot", "first", "no"),
comp = NULL,
color = FALSE,
just_diff = FALSE
)
tabs |
A |
pct |
The type of percentages to calculate. |
digits |
The number of digits to print for percentages. As a single integer,
or an integer vector the same length than |
ref |
The reference cell to calculate differences and ratios
(used to print
|
comp |
Comparison level. When |
color |
Set to |
just_diff |
If percentages are already calculated and you just want to recalculate differences. |
A tibble
of class tab
, with percentages displayed, possibly
colored based on differences from totals or first cell.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.