-
Notifications
You must be signed in to change notification settings - Fork 59
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
Add data.frame -> shinyTree helper function #8
Comments
I came up with this function inspired by this discussion https://community.rstudio.com/t/how-to-recursively-apply-a-function-to-a-nested-list-of-data-frames/70324/3. I can make a PR if it looks good. Function + MWE:
|
@JasperSch This is very nice. I would lean toward this being an example rather than a member of the package because I think often people might want to customize it (to include the column name for example). On the other hand, if we had a dfToTree and a treeToDF, maybe it makes sense to have those as member functions. I would like to hear what other people think, and then I hope you will move forward with a PR. |
@bellma-lilly Thank you for the feedback. Both options seem reasonable to me. I'll be glad to contribute once a decision is made. |
Regarding treeToDf, this is what I'm currently using:
|
@JasperSch It looks like we aren't going to get a lot of feedback. I'll leave the decision to you, as it is your code. I look forward to adding it to the package. Thanks for your contribution! |
Great work @JasperSch! I think the function definitely deserves to be included in the package as I think it would be easier to transform a dataframe into the structure the function needs than to build the list itself. So, I think it would definitely benefit most of the users, especially newcomers. If you want to create your custom list, you can still do so. |
Great work! Thanks a lot. |
From #4
More details in comments to the original issue.
The text was updated successfully, but these errors were encountered: