File tree Expand file tree Collapse file tree 3 files changed +78
-327
lines changed Expand file tree Collapse file tree 3 files changed +78
-327
lines changed Original file line number Diff line number Diff line change 1+ # case_when() conditions must be logical (and aren't cast to logical!)
2+
3+ Code
4+ case_when(1 ~ 2)
5+ Condition
6+ Error in `case_when()`:
7+ ! `..1 (left)` must be a logical vector, not the number 1.
8+
9+ ---
10+
11+ Code
12+ case_when(TRUE ~ 2, 3.5 ~ 4)
13+ Condition
14+ Error in `case_when()`:
15+ ! `..2 (left)` must be a logical vector, not the number 3.5.
16+
17+ # case_when() does not accept classed logical conditions
18+
19+ Code
20+ case_when(x ~ 1)
21+ Condition
22+ Error in `case_when()`:
23+ ! `..1 (left)` must be a logical vector, not a <my_logical> object.
24+
25+ # case_when() logical conditions can't be arrays (#6862 )
26+
27+ Code
28+ case_when(x ~ y)
29+ Condition
30+ Error in `case_when()`:
31+ ! `..1 (left)` must be a logical vector, not a logical matrix.
32+
33+ ---
34+
35+ Code
36+ case_when(x ~ y)
37+ Condition
38+ Error in `case_when()`:
39+ ! `..1 (left)` must be a logical vector, not a logical 1D array.
40+
141# ` .default ` isn't part of recycling
242
343 Code
3373# ` NULL ` formula element throws meaningful error
3474
3575 Code
36- case_when(1 ~ NULL)
76+ case_when(TRUE ~ NULL)
3777 Condition
3878 Warning:
3979 Calling `case_when()` with size 1 LHS inputs and size >1 RHS inputs was deprecated in dplyr 1.2.0.
63103 case_when(NULL ~ 1)
64104 Condition
65105 Error in `case_when()`:
66- ! `..1 (left)` must be a vector, not `NULL`.
106+ ! `..1 (left)` must be a logical vector, not `NULL`.
67107
68108# throws chained errors when formula evaluation fails
69109
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments