Skip to content

Avoid forced copy in step_setnames() and rename_with()#486

Open
tinygreen wants to merge 1 commit into
tidyverse:mainfrom
tinygreen:rename-avoid-copy
Open

Avoid forced copy in step_setnames() and rename_with()#486
tinygreen wants to merge 1 commit into
tidyverse:mainfrom
tinygreen:rename-avoid-copy

Conversation

@tinygreen

Copy link
Copy Markdown

step_setnames() and rename_with() will now not force a copy() if lazy_dt() was called with immutable = FALSE. In line with how mutate() and relocate() already behave.

Added test for rename() with immutable = FALSE. Updated expected result of pivot_wider() test, as the call to step_setnames() triggered an unnecessary copy() there too, which is now also avoided.

Fixes #485

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.

rename() and rename_with() trigger copy() despite immutable = FALSE

1 participant