Skip to content

Conversation

@DavisVaughan
Copy link
Member

This also ensures that we only use data frame operations that we have documented that we use internally. Specifically, this avoids df[i, j] (and its assignment variant) which suffers from drop = FALSE issues with bare data frames. It is replaced with usage of df[i], dplyr_row_slice(), and dplyr_col_modify(). Tests have been added to ensure that we never regress here.

Preserving the column types in x was something that we already document, but this wasn't actually occurring correctly. Instead, we often ended up taking the common type (especially with bare data frames).

This also ensures that we only use data frame operations that we have documented that we use internally. Specifically, this avoids `df[i, j]` (and its assignment variant) which suffers from `drop = FALSE` issues with bare data frames. It is replaced with usage of `df[i]`, `dplyr_row_slice()`, and `dplyr_col_modify()`. Tests have been added to ensure that we never regress here.
@DavisVaughan DavisVaughan merged commit 62e2280 into tidyverse:main Apr 25, 2022
@DavisVaughan DavisVaughan deleted the fix/data-frame-slicing branch April 25, 2022 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant