You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, this would be useful, agree. As I wrote under #2159, I remember implementing unwrap() sometime ago, and I prefer it to unnest, if that's all fine. Marking #2159 as duplicate.
Activity
MichaelChirico commentedon Jun 2, 2017
Also:
https://stackoverflow.com/questions/44336733/
https://stackoverflow.com/q/48831637/3576984
Suggestion to make such a function more flexible than
unnestas well; building on the example in the linked SO Q, consider:tidyr::unnest(dt1)is an error, but a "cross-join" at rows with mis-matched lengths is probably appropriate.arunsrinivasan commentedon Jun 29, 2017
Yes, this would be useful, agree. As I wrote under #2159, I remember implementing
unwrap()sometime ago, and I prefer it tounnest, if that's all fine. Marking #2159 as duplicate.franknarf1 commentedon Jul 11, 2019
Some other possible extensions / convenience features from this SO q: https://stackoverflow.com/q/56981960
r2evans commentedon Sep 24, 2020
As a mod to @franknarf1 's code, the empty row can be preserved
aourednik commentedon May 12, 2022
This seems to work quite efficiently (my test with 1 million rows of similar structure took about a minute)
m-muecke commentedon Jul 13, 2024
For reference the unnest implementation in mlr3misc: https://mlr3misc.mlr-org.com/reference/unnest.html