Skip to content

Conversation

@DavisVaughan
Copy link
Member

@DavisVaughan DavisVaughan commented Oct 10, 2025

recode_values() and replace_values() are a much more holistic replacement for recode() than case_match()!

  • recode() was trying to be both a "full recode" and "partial replacement" function, which resulted in weird behavior that was pretty easy to run into. Even case_match() wasn't a good replacement, because to do a "partial replacement" the right way you needed the .default and .ptype arguments.

  • recode(x, !!!lookup) wasn't supported by case_match(), making migration difficult. We can now use the from and to arguments, which also support more than just character values as well.

@DavisVaughan DavisVaughan merged commit 1837d55 into main Oct 10, 2025
14 checks passed
@DavisVaughan DavisVaughan deleted the feature/recode-to-recode-values branch October 10, 2025 17:07
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.

3 participants