-
Notifications
You must be signed in to change notification settings - Fork 127
fct_collapse applying collapsed factors in wrong order when group_other = TRUE #172
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
Labels
bug
an unexpected problem or unintended behavior
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@AmeliaMN do you want to have a look at this? |
@AmeliaMN I have added some further comments on the original pull request which might help also. |
The reprex still results in incorrect levels. |
I believe |
gtm19
added a commit
to gtm19/forcats
that referenced
this issue
Jan 21, 2020
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm having an issue which is self explanatory from the title. Reprex below. As you can see, the classification produced by
fct_collapse
is incorrect.As requested, a simpler set of examples is below.
Example 1 - Collapsing Character Variables
The
fct_collapse
function wrongly classifies raspberry as a vegetable, rather than broccoli.Example 2 - Collapsing _Factor_Variables
For clarity, and contrary to my previous explanation, this bug affects both character and factor variables (since
fct_collapse
converts the.f
argument to a factor if it is a character variable):Example 3 - with
group_other
argument set toFALSE
Just to demonstrate that this bug does not occur when
group_other
is set toFALSE
:Session Info
Created on 2019-02-17 by the reprex package (v0.2.1)
The text was updated successfully, but these errors were encountered: