Soft-deprecate case_when() with all size 1 LHS and any size >1 RHS
#7724
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.
This description is outdated but I've left it for historical purposes, see below comments
Closes #7082
This is a breaking change.
Motivating example with CRAN dplyr:
With this PR
In #7082 (comment) I explained how changing to this behavior increases the safety of
case_when()(as seen above) and brings us one step closer to my idealcase_when()behavior. Unfortunately, having to supportTRUE ~will keep us from reachingcase_when()nirvana.In #7082 (comment), I note that this should only affect an extremely small fraction of cases - a prerequisite for this to be a change in behavior is that all of your LHS inputs must have been length 1, which is quite rare. Regardless, I will run revdeps to assess.
"8fa7eaf9-c4e6-4fe9-b7e9-7855b11046a6"