-
Notifications
You must be signed in to change notification settings - Fork 417
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
Rectangling tools for tree like data frames #1384
Comments
Where do you encounter this sort of data? I've never seen it before, which makes me suspect this code is better off in a separate package. |
Examples would be a directory structure or a category tree that you get from an API. You parse the JSON and you have this tree structure. |
In general, we're cautious about adding tools for workflows that we don't experience, so given that I have no intuition for this type of data, I'd prefer to keep it out of tidyr for now. |
Closing this for the above reasons; I think it's an interesting idea, but doesn't feel right for tidyr yet. |
There are some nice rectangling tools in tidyr but I regularly miss a tool to rectangle/flatten tree like (or recursive) data frames. For example I want to get from
Created on 2022-08-25 with reprex v2.0.2
to the following
Created on 2022-08-25 with reprex v2.0.2
Of course this can be done with the existing tools of tidyr but it is a bit tedious. It would be great to add
unnest_tree()
andnest_tree()
to handle this kind of data.The text was updated successfully, but these errors were encountered: