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

Support tidyr functions? #491

Open
etiennebacher opened this issue Jan 24, 2025 · 4 comments
Open

Support tidyr functions? #491

etiennebacher opened this issue Jan 24, 2025 · 4 comments

Comments

@etiennebacher
Copy link

Hello, I don't see functions from tidyr that I find quite useful in data wrangling, such as separate() or unite(). Is the support for tidyr S3 methods on the roadmap or is it out of scope for the package?

Thanks

@krlmlr
Copy link
Member

krlmlr commented Feb 2, 2025

Thanks. I believe it's in scope, but could tidyr also be changed in such a way that it works out of the box with duckplyr?

@etiennebacher
Copy link
Author

etiennebacher commented Feb 2, 2025

I don't understand the question but maybe it's just because I'm not familiar with duckplyr's internals. Isn't duckplyr adding methods for dplyr's S3 generics? If so, couldn't the same be done with tidyr's generics, and why would it require changes in tidyr?

@krlmlr
Copy link
Member

krlmlr commented Feb 2, 2025

Just hypothetically: if tidyr could rely on dplyr and on duckplyr-supported functions, we wouldn't need to do anything here. Looking at the implementation of tidyr:::separate.data.frame(), this seems elusive, though. More specifically, at least the extra = "warn" and fill = "warn" arguments, and also convert, will be difficult to implement.

Happy to review a sketch for an S3 method here.

@etiennebacher
Copy link
Author

Just to clarify in case someone else is interested in this, I don't plan on making a sketch of this S3 method (for the coming weeks at least).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants