cur_group()
and size zero grouped data frame edge case bug
#6304
Labels
cur_group()
and size zero grouped data frame edge case bug
#6304
This has to do with the number of rows returned by
group_data()
, and therefore bygroup_keys()
We do this workaround when there are zero groups, but it only applies to the group rows
dplyr/R/data-mask.R
Lines 4 to 8 in 55dfc1c
It seems like we need to make a similar kind of patch to
group_keys()
as welldplyr/R/data-mask.R
Line 26 in 55dfc1c
Maybe it should be set to
vec_init(group_keys(), n = 1)
if there are no groups? That would allowcur_group()
to return a size 1 result, which would then be recycled back to size 0That would give this result, where you can see the initialized 1 row keys if you really want to
The text was updated successfully, but these errors were encountered: