Closed DavisVaughan closed 2 years ago
Thanks for this fix. Our NOAA OCM procedures currently keep me from pulling directly from a non-NOAA contributor. However, I will make the fix as you show in our copy and add you as a contributor. Thanks again! Dave
We are planning on releasing tidyr 1.2.0 towards the end of this month.
We noticed in revdeps that this package was broken. An easy way to reproduce is to install the dev version of tidyr and run this example:
The problem comes down to the fact that you were trying to call
complete()
with a grouped data frame, and you were trying to complete on the group column. This is actually not well defined, ascomplete()
completes "within" each group, so you really shouldn't have access to the group variables. The previous behavior was problematic in many cases (see https://github.com/tidyverse/tidyr/issues/396 and https://github.com/tidyverse/tidyr/issues/966), so we've made a fix to ensure thatcomplete()
works correctly with grouped data frames in all cases. This fix comes with the restriction that now you can't specify the group variables in the call tocomplete()
.It looks like everything would work fine if you just drop the groups entirely, so that is what this PR does.
This should work on both the current and development version of tidyr, so you should be able to go ahead and do a patch release. We would greatly appreciate if you could do this so we can release tidyr! Thank you!