-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Improve docs for data_to_wide #506
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, those are nice docs improvements. However I disagree on the renaming of id_cols
as by
. I don't think it makes things any clearer but instead leads to confusion since those two functions are clearly based on tidyr::pivot_*()
functions so departing from those only for one argument is strange.
Regarding the tweet, I just have access to the first one since I don't have an X account, so maybe there are more explanations, but to me those pivot_*()
functions made pivoting/unpivoting so much easier to understand than reshape2
or data.table
approaches.
True, but I think |
By @strengejacke in a review comment:
|
I think we should deprecate and then remove one of the two. Those pivot functions already have a lot of args so I suggest we avoid adding bloat with aliases.
I don't think there is a best choice for this, one could use
Considering a Curious about what others think about renaming |
We slice and reshape I just realize that when you teach R to beginners, it's really good if you can repeat yourself: "use select for..." or "use by for...". Easier to understand and remember for newbies |
I think I agree with @etiennebacher; id_cols' purpose was to eventually specify an index, but i don't think it is conceptually different from what Sorry @strengejacke 😅 - but I'm not convinced it should be replaced or made an alias |
I don't quite understand the use of |
Yes, that's why I thought we could use But I'm ok with sticking to I think "re-thinking" reshaping data in this way makes it rather easy to use, especially since it would be in line with our other functions. |
Btw, for |
I think the conceptual similarity of |
Ok, if nobody likes my suggestion (😢), let's stick to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, the failures look unrelated to this PR.
RIP by
in data_to_wide()
Background: https://x.com/stephenjwild/status/1792294171924967920
And I recently wanted to use
data_to_wide()
and couldn't get it work at first, took some time to figure out the logic behind reshaping to wide again. Especially, the documentation ofid_cols
was confusing.