Returns a tidy table of summary stats
Arguments
- df
data frame
- condition
filter condition, i.e.
patient == "new"
- group_vars
variables to group by, i.e.
c(specialty, state, hcpcs, cost)
- summary_vars
variables to summarise, i.e.
c(min, max, mode, range)
- arr
column to arrange data by, i.e.
cost
Examples
if (FALSE) {
download_datasets(specialty = "vascular surgery") |>
tidytable::slice_head(n = 10) |>
summary_stats(condition = patient == "new",
group_vars = c(specialty, state, hcpcs, cost),
summary_vars = c(min, max, mode, range),
arr = cost)
}