group_size: Calculate group sizes.

Description Usage Arguments Examples

View source: R/group-size.r

Description

Calculate group sizes.

Usage

1
2
3

Arguments

x

a grouped tbl

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)
}

sctyner/dplyr050 documentation built on May 17, 2019, 2:22 p.m.