Skip to content

FR: group_indices() should also return vector of group representatives #2121

Closed
@krlmlr

Description

@krlmlr

perhaps as an attribute. This will allow simplifying and accelerating tidyr::nest().

Example:

iris[c(1,2,50,51,100,101), ] %>% group_by(Species) %>% group_indices
## [1] 1 1 1 2 2 3
## attr(,"repr")
## [1] 1 4 6

Metadata

Metadata

Labels

featurea feature request or enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions