Edit: Worth mentioning for this review - count() and tally() approach groups differently. tally() follows the summarize(.groups = "drop_last") idea.
library(dplyr)
df <- tibble(x = c("a", "a", "b"), y = c("a", "a", "b"))
df %>%
group_by(x, y) %>%
count()
#> # A tibble: 2 × 3
#> # Groups: x, y [2]
#> x y n
#> <chr> <chr> <int>
#> 1 a a 2
#> 2 b b 1
df %>%
group_by(x, y) %>%
tally()
#> # A tibble: 2 × 3
#> # Groups: x [2]
#> x y n
#> <chr> <chr> <int>
#> 1 a a 2
#> 2 b b 1
Closes #356
Edit: Worth mentioning for this review -
count()
andtally()
approach groups differently.tally()
follows thesummarize(.groups = "drop_last")
idea.