powered by
Calculate group sizes.
group_size(x)n_groups(x)
n_groups(x)
a grouped tbl
if (require("nycflights13")) { by_day <- flights %>% group_by(year, month, day) n_groups(by_day) group_size(by_day) by_dest <- flights %>% group_by(dest) n_groups(by_dest) group_size(by_dest) }
Run the code above in your browser using DataLab