Count rows and columns and pivot to wide format
Examples
fuimus:::forager_data(10) |>
count_wide(c(ins_class), payer)
#> # A tibble: 2 × 7
#> ins_class Anthem BCBS Centene Cigna Medicaid UnitedHealth
#> <chr> <int> <int> <int> <int> <int> <int>
#> 1 Primary 1 1 2 1 1 1
#> 2 Secondary 1 1 1 0 0 0