-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fct_collapse produces wrong counts when group_other = TRUE #202
Comments
Could you please rework your reproducible example to use the reprex package ? That makes it easier to see both the input and the output, formatted in such a way that I can easily re-run in a local session. |
Of course. Just did. Thank you! |
OK, I'm digging into this one. Basically, we're corrently assigning the new names over the old factor levels as though they were in the order of the new levels (they're not — it's just that they happened to be in close enough order that some of the results were right, currently, it assumes that whatever the last item in your original list of factors is what you want to put into "Other"). Happens here: Line 29 in fb11604
|
Moving the bullet point referencing tidyverse#172 and tidyverse#202, as it was put under 0.4.0 heading by mistake -- it was not part of that release. Raised in issue tidyverse#219.
Using the example given in the package.
Remove the grouping of Other Party, add group_other=TRUE, expect Other has a count of 'Other Party' 393, but result shows 3490.
Created on 2019-08-08 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered: