group_vars() returns a character vector; groups() returns a list of symbols.

groups(x)

group_vars(x)

Arguments

x

A tbl()

See also

Examples

df <- tibble(x = 1, y = 2) %>% group_by(x, y) group_vars(df)
#> [1] "x" "y"
groups(df)
#> [[1]] #> x #> #> [[2]] #> y #>