Skip to content
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

fix fct_collapse group_other = TRUE misleveling #205

Closed
wants to merge 2 commits into from
Closed

fix fct_collapse group_other = TRUE misleveling #205

wants to merge 2 commits into from

Conversation

avishaitsur
Copy link

This fix addresses the wrong leveling that occurred due to assigning the old values to the new factor instead of both the new levels and the unchanged ones (who then become "Other"). As far as I've tried it, it works... but I'm no R expert and also new to GitHub as well - just uses fct_collapse quite a lot.

This fix addresses the wrong leveling that occured due to assigning the old values to the new factor instead of both the new levels and the unchanged ones (who now become "Other")
@batpigandme
Copy link
Contributor

This is actually already covered in #176, but hasn't been merged yet.

@avishaitsur
Copy link
Author

Oh, I see -
I've seen the fix by gtm19 is from Feb 18th, 2019,
but the conversation thread from May 10th, 2019 said to drop fct_collapse so I thought there is some kind of a problem and still prevents it from working.

Would it be merged soon?

@batpigandme
Copy link
Contributor

Would it be merged soon?

I imagine so.

Added the parameter name_other as a string with a default "Other". If group_other = TRUE, all levels not named in `...` would have the name given in name_other.
@avishaitsur
Copy link
Author

Thanks for the reply.

Also added a name_other argument to allow to name the "Other" category differently and address issue #194
Defaults to "Other" so should have backward compatibility problems.

@hadley hadley closed this Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants