Makes a fancy table, inspired from 'tab' from STATA.
1 2 |
.data |
data frame. The data to put in the table. |
... |
The variables to plot in the table, plus any relevant filters contained within 'filters()'. Currently supports one or two variables. |
top |
numeric. If >0, all vectors will only print the top N elements and all other elements will be called "Other", where N is the value for top. |
freq |
logical. If TRUE, frequencies are printed in the table. |
percent |
logical. If TRUE, percentages are printed in the table. |
byrow |
logical. If TRUE, percentages are row percentages. If false, column percentages. If NULL, individual cell percentages. |
sort |
logical. If TRUE, the resulting table is sorted (if possible). |
sort.decreasing |
logical. If TRUE, the sort is preformed in a descending manner. |
na.rm |
logical. If TRUE, all NAs and NA-like entries are removed from the data before tabling. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.