Skip to content

filtering a grouped table removes indices attribute #880

@Mullefa

Description

@Mullefa

For example:

# OK
iris %>% 
  group_by(Species) %>%
  attr("indices")

# not OK
iris %>% 
  group_by(Species) %>%
  filter(n() > 0) %>%
  attr("indices")

devtools::session_info()
# dplyr        0.4.0.9000 2015-01-11 Github (hadley/dplyr@cd91f33)    

If this is intended (I imagine its not), then at least the n_groups() method for a grouped_df needs to be fixed.

Metadata

Metadata

Labels

bugan unexpected problem or unintended behavior

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions