Last chance! 50% off unlimited learning
Sale ends in
Get the counts of a column by a particular grouping if supplied, otherwise just get counts of a column.
category_counts_tbl(.data, .count_col, .arrange_value = TRUE, ...)
The data.frame/tibble supplied.
The column that has the values you want to count.
Defaults to true, this will arrange the resulting tibble in descending order by .count_col
Place the values you want to pass in for grouping here.
Steven P. Sanderson II, MPH
Requires a data.frame/tibble.
Requires a value column, a column that is going to counted.
library(healthyR.data)
library(dplyr)
healthyR_data %>%
category_counts_tbl(
.count_col = payer_grouping
, .arrange = TRUE
, ip_op_flag
)
healthyR_data %>%
category_counts_tbl(
.count_col = ip_op_flag
, .arrange_value = TRUE
, service_line
)
Run the code above in your browser using DataLab