Learn R Programming

poorman (version 0.2.6)

group_cols: Select Grouping Variables

Description

This selection helper matches grouping variables. It can be used within select() and relocate() selections.

Usage

group_cols()

Arguments

See Also

groups() and group_vars() for retrieving the grouping variables outside selection contexts.

Examples

Run this code
mtcars %>% group_by(am, cyl) %>% select(group_cols())

Run the code above in your browser using DataLab