Add rbind.rowwise_df() method
#7730
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes r-lib/vctrs#1935
Really closes #7024, which had become the vctrs issue because I thought the problem was there
Closes #7057
rbind(x, y)has a behavior where it retains the attributes ofxexactly. It literally just uses anunclass()-edxas the base object to start rbind-ing group. This means that any attributes ofxthat depend on the data will be wrong, likegroupsfor us.It's this
value <-setting on the first iterationhttps://github.com/wch/r-source/blob/8a1c36e93d8c72d4538f56bc59f5e780aac1a533/src/library/base/R/dataframe.R#L1331-L1332
We already have
rbind.grouped_df()for grouped data frames which just callsbind_rows(), so I'm now addingrbind.rowwise_df()which also just callsbind_rows(). That fixes the problem.