Clash with chop() in tidyr
cpsyctc2 opened this issue · 6 comments
I'm not sure if this is a bug but it may be a challenge if you want to get santoku very wide uptake. I think your chop is great but I've just realised that it collides with chop() in tidyR. Obviously it's easy to work around this by using santoku::chop() when I've loaded tidyR first but perhaps a name contention with such a widely used package is unwise and maybe it's not too late to change? Very best, Chris
Not on twitter but best wishes with your work.
In the end I decided to leave it as it is, but added kut()
as a synonym. chop()
is very intuitive, and I can't find a nice synonym that is as memorable. chop()
is a second-order, rather technical part of the latest tidyr API, and I wouldn't be surprised if it vanished. So, I will brazen it out. And if the tidyverse guys complain, I can always remind them of filter()
...
Leaving open for the moment to remind me that this issue is not dead.
Was gonna suggest kiru()
(+1 from me in any case) and mention the the problematic meaning of kut()
in Dutch, but looked up the Twitter thread and saw that those already have been mentioned.
FWIW: While I agree with the "second-order part of the tidyr API" (not sure about the vanishing part, though), one cosmetic aspect worth considering might be that if you load both packages, you'll always get a masked warning (unless you explicitly set warn.conflicts = FALSE
):
library(tidyr)
library(santoku)
#>
#> Attaching package: 'santoku'
#> The following object is masked from 'package:tidyr':
#>
#> chop
kiru()
is now the alternative to chop()
, instead of kut()
.