Learn R Programming

tidytable (version 0.11.1)

group_vars: Get the grouping variables

Description

Get the grouping variables

Usage

group_vars(x)

Arguments

x

A grouped tidytable

Examples

Run this code
df <- data.table(
  a = 1:3,
  b = 4:6,
  c = c("a", "a", "b"),
  d = c("a", "a", "b")
)

df %>%
  group_by(c, d) %>%
  group_vars()

Run the code above in your browser using DataLab