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

fct_collapse() - change "Other" name #194

Closed
jamiefo opened this issue Apr 2, 2019 · 4 comments
Closed

fct_collapse() - change "Other" name #194

jamiefo opened this issue Apr 2, 2019 · 4 comments
Labels
feature a feature request or enhancement wip work in progress

Comments

@jamiefo
Copy link

jamiefo commented Apr 2, 2019

Hi,

For the fct_collapse() function there is an option to set group_other = TRUE/FALSE.
May there please be an option added to rename the "Other" group to anything we want so that it will minic a case_when statement. It's inefficient to use both fct_collapse() and then fct_other() to rename the "Other" bucket. I would want to name the catch all bucket to something of my choice. This is a bit of a pain point for me when using it. I believe most would run to a case_when() statement if this option was not updated.

james

@gtm19
Copy link
Contributor

gtm19 commented Sep 2, 2019

I did consider incorporating this into my fix (#176) for #172, but couldn't decide whether this flexibility should be confined to fct_other().

@hadley?

@hadley
Copy link
Member

hadley commented Sep 3, 2019

@gtm19 I think it would be best as a separate PR. Maybe we could change the default of group_other to NULL, and then when it's a string we'd use that as the name of the other group? (We'd also need to check for TRUE to make sure it's backward compatible)

@gtm19
Copy link
Contributor

gtm19 commented Sep 3, 2019

@hadley Either that, or we could add an other_level argument which defaults to "Other" (for consistency with fct_other()).

I think I prefer the latter, and this would still be backwards compatible.

@hadley
Copy link
Member

hadley commented Sep 3, 2019

Two arguments seem excessive for this simple feature. Maybe we should just use other_level and deprecate group_other?

@hadley hadley added feature a feature request or enhancement wip work in progress labels Jan 21, 2020
@hadley hadley closed this as completed in d2e05f5 Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement wip work in progress
Projects
None yet
Development

No branches or pull requests

3 participants