Count and calculate proportion of each group
Examples
mock_forager() |>
count_prop(payer, sort = TRUE)
#> # A tibble: 8 × 3
#> payer n prop
#> <fct> <int> <dbl>
#> 1 BCBS 2 0.2
#> 2 MAO 2 0.2
#> 3 Anthem 1 0.1
#> 4 Centene 1 0.1
#> 5 Cigna 1 0.1
#> 6 Humana 1 0.1
#> 7 Medicare 1 0.1
#> 8 UHC 1 0.1