Should complete()
and expand()
disallow accessing the group columns?
#1299
Labels
ask
breaking change ☠️
API change likely to affect existing code
bug
an unexpected problem or unintended behavior
grids #️⃣
expanding, nesting, crossing, ...
group 👨👨👦👦
With #1289 we added a grouped-df method for
complete()
. Originally I made the decision to passcur_data_all()
through to each ungrouped call tocomplete()
because it seemed like people were (nonsensically) completing on grouping variables. This actually causes issues!tidyr/R/complete.R
Lines 99 to 108 in c73cf21
I am thinking we should just pass
cur_data()
through instead, which would avoid the issue seen below.This would result in a breaking change that people would no longer be able to complete on a grouping variable (You'd get an error saying that the grouping variable isn't found). But I think that completing on a grouping variable is a bit useless, as the whole point is to complete within that variable, so you shouldn't have access to it.
Created on 2022-01-10 by the reprex package (v2.0.1)
The text was updated successfully, but these errors were encountered: