-
Notifications
You must be signed in to change notification settings - Fork 128
Split fct_lump components to fct_prop and fct_count (new branch name) #247
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
Split fct_lump components to fct_prop and fct_count (new branch name) #247
Conversation
…use internal consistent shared functions.
NEWS item.
bulleted list in fct_lump description
no unpacking all tests pass
Can you take a look at the code coverage please? (with e.g. |
one correction
Test coverage updated: R/lump.R - 97.12% The only remaining lines are, I think, impossible to get to, e.g. returning from an |
I made a few documentation tweaks which with left me with two questions:
|
Did you mean to push changes? My understanding is that f <- c("a", "a", "a", "b", "b", "c", "d", "e", "f", "g")
table(f)
#> f
#> a b c d e f g
#> 3 2 1 1 1 1 1
fct_lump_count(f, count = 2)
#> [1] Other Other Other b b Other Other Other Other Other
#> Levels: b Other
fct_lump_count(f, count = 3)
#> [1] a a a Other Other Other Other Other Other Other
#> Levels: a Other Created on 2020-02-23 by the reprex package (v0.3.0) I don't know what the use-case is for such a function but the request for it was #142. There was also some discussion about making the logic The smallest and largest refactoring makes sense to me but would require changing the internal logic for positive/negative |
The function as described in #142 seems useful. From my understanding, |
@jonocarroll oops yes, pushed. Oh, I didn't notice that you added more arguments to It looks like |
I've decided to merge what we have so far so I can get the release out today. I think we'll probably have to think holistically about |
fct_lump
.fct_lump
test file.Closes #167
Closes #142