Open filosi opened 1 year ago
Thanks for reporting Michele @filosi - one maybe working solution would be to create a S4 method for the groups
(instead of a simple function), add a method for DataModule
and the method for ANY
would simply forward to e.g. dplyr
- do you want to give it a go Michele and make a pull request?
I can give it a try and let you know!
Ah, and please either develop in your own branch or fork the repo and then do a PR to the main branch.
I tried with the solution @jorainer proposed, but still the method is not dispatched correctly. I found a possible workaround. When loading dplyr
packages it create an S3 groups
, and even thought the S4 method is present, it's not dispatched correctly on the current class. I proposed a solution which add some "repeated" code exporting the same .groups
function through S3 method dispatch.
Please check it out https://github.com/filosi/tidyfr/tree/feature/groups_conflict before make the pull request.
Had a quick look - and if that works I'm totally OK with it - can you please make the PR? then we can discuss there directly in the code.
The
group
method of thetidyfr
package have a conflict withdplyr::groups()
function.Possible solutions could be:
conflicted
package https://www.tidyverse.org/blog/2018/06/conflicted/ load before any other libraries and then chose which method to use as default.tidyrfr::groups()