Add by to chop()#1597
Conversation
|
Regarding the above snags:
I believe that is correct. I have kept this behavior.
I believe changing this behavior of
This is now an informative error. It now operates the same way as
I'd argue this aligns with |
| chop <- function(data, cols, ..., error_call = current_env()) { | ||
| chop <- function( | ||
| data, | ||
| cols = NULL, |
There was a problem hiding this comment.
Perhaps in a perfect world I'd move cols after the empty ... now that it default to NULL, but that would probably not be worth the effort
Let me know if this feels too awkward as is to you
There was a problem hiding this comment.
I think it's worth considering? It's not too much effort to provide a deprecation message when !missing(...1)?
And fix a buglet when `i` is a length >1 character vector, which happens with `all_of()`
|
@DavisVaughan anything in particular that you're looking for from my review? |
|
@hadley I have left 3 comment blocks open above. Just take a look at those, I'm confident in the implementation |
hadley
left a comment
There was a problem hiding this comment.
I really like filling in this little gap in the tidyverse ecosystem!
| chop <- function(data, cols, ..., error_call = current_env()) { | ||
| chop <- function( | ||
| data, | ||
| cols = NULL, |
There was a problem hiding this comment.
I think it's worth considering? It's not too much effort to provide a deprecation message when !missing(...1)?
With soft-deprecated compat support for the old style
|
Thanks for getting this started @hrryt! |
Fixes #1490
Fixes #1506
Snags:
colsandby, should we 'chop everything' asnest()does? I have thrown an error instead.chop()use group vars ifdatais grouped, asnest()does? Would this require a generic?colsandby? For now, the name is duplicated and repaired.An example for the latter point: