category_counts_tbl {healthyR} | R Documentation |
Counts by Category
Description
Get the counts of a column by a particular grouping if supplied, otherwise just get counts of a column.
Usage
category_counts_tbl(.data, .count_col, .arrange_value = TRUE, ...)
Arguments
.data |
The data.frame/tibble supplied. |
.count_col |
The column that has the values you want to count. |
.arrange_value |
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. |
Details
Requires a data.frame/tibble.
Requires a value column, a column that is going to counted.
Author(s)
Steven P. Sanderson II, MPH
See Also
Other Data Table Functions:
los_ra_index_summary_tbl()
,
named_item_list()
,
top_n_tbl()
,
ts_census_los_daily_tbl()
,
ts_signature_tbl()
Examples
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
)
[Package healthyR version 0.2.2 Index]