markfairbanks / tidytable

Tidy interface to 'data.table'
https://markfairbanks.github.io/tidytable/
Other
450 stars 32 forks source link

Implement `group_by(.add = )` #662

Closed markfairbanks closed 2 years ago

markfairbanks commented 2 years ago
pacman::p_load(dplyr)

df <- tibble(x = c("a", "a", "b"), y = c("a", "a", "b"), z = 1:3)

df %>%
  group_by(x) %>%
  group_by(y, .add = TRUE) %>%
  group_vars()
#> [1] "x" "y"