dplyr (version 0.4.2)

groups: Get/set the grouping variables for tbl.

Description

These functions do not perform non-standard evaluation, and so are useful when programming against tbl objects. ungroup is a convenient inline way of removing existing grouping.

Usage

groups(x)

ungroup(x)

Arguments

x
data tbl

Examples

Run this code
grouped <- group_by(mtcars, cyl)
groups(grouped)
groups(ungroup(grouped))

Run the code above in your browser using DataCamp Workspace