Trim grouping structure
group_trim()
is particularly useful after a filter()
that is intended
to select a subset of groups.
group_trim(.tbl, .drop = group_by_drop_default(.tbl))
.tbl |
|
.drop |
See |
Other grouping functions:
group_by()
,
group_map()
,
group_nest()
,
group_split()
iris %>% group_by(Species) %>% filter(Species == "setosa", .preserve = TRUE) %>% group_trim()
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.