tally_wide: Create contingency tables with two variables
Description
This function takes a tibble and create human readable
contingency tables from two variables, either by showing
number of cases in each combination or weighted by the sum of a numerical variable
Usage
tally_wide(tibble, rows, cols, wt = NULL, ...)
Value
A tibble
Arguments
tibble
A tibble containing at least two columns
rows
The column with the levels included as rows in the final table.
cols
The column with the levels included as columns in the final table.
wt
The column (numeric) whose values to add in order to fill the cells. If wt = NULL (the default), counts are returned instead of weighted sums.
...
Any parameters that can be passed to tally_wide 'values_fill' is a useful one