View source: R/data-tbl-category-counts.R
category_counts_tbl | R Documentation |
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, ...)
.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. |
Requires a data.frame/tibble.
Requires a value column, a column that is going to counted.
Steven P. Sanderson II, MPH
Other Data Table Functions:
los_ra_index_summary_tbl()
,
named_item_list()
,
top_n_tbl()
,
ts_census_los_daily_tbl()
,
ts_signature_tbl()
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
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.