View source: R/table_percent.R
This is a wrapper function for table. It adds percentages to existing counts normally returned by table. This is only written for 1 or 2 variable.
1 2 | table_percent(x, y = NULL, direction = "row", total = "both",
useNA = "ifany", rnd = 1)
|
x |
first variable to tabulate |
y |
(optional) second variable to tabulate |
direction |
"row" or "col" for horizontal vs vertical percentages |
total |
"both", "row" or "col" for totals columns |
useNA |
"none","ifany","always" passed directly to table |
rnd |
round percentages to this many decimal places. This uses |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.