Update logicals - case_when - reorder arguments (#1167)
This commit is contained in:
parent
1ffbbf90b5
commit
5750b23270
|
@ -535,11 +535,11 @@ flights |>
|
|||
mutate(
|
||||
status = case_when(
|
||||
is.na(arr_delay) ~ "cancelled",
|
||||
arr_delay > 60 ~ "very late",
|
||||
arr_delay > 15 ~ "late",
|
||||
abs(arr_delay) <= 15 ~ "on time",
|
||||
arr_delay < -15 ~ "early",
|
||||
arr_delay < -30 ~ "very early",
|
||||
arr_delay < -15 ~ "early",
|
||||
abs(arr_delay) <= 15 ~ "on time",
|
||||
arr_delay > 15 ~ "late",
|
||||
arr_delay > 60 ~ "very late",
|
||||
),
|
||||
.keep = "used"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue