Learn R Programming

dplyr (version 0.7.1)

groups: Return grouping variables

Description

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

Usage

groups(x)

group_vars(x)

Arguments

Examples

Run this code
# NOT RUN {
df <- tibble(x = 1, y = 2) %>% group_by(x, y)
group_vars(df)
groups(df)
# }

Run the code above in your browser using DataLab