desc() is unnecessary, as later filtered both first and last (#1447)

This commit is contained in:
Mitsuo Shiota
2023-05-10 10:15:55 +09:00
committed by GitHub
parent 58547b1ec4
commit c6f11c6707

View File

@@ -742,7 +742,7 @@ Filtering gives you all variables, with each observation in a separate row:
```{r}
flights |>
group_by(year, month, day) |>
mutate(r = min_rank(desc(sched_dep_time))) |>
mutate(r = min_rank(sched_dep_time)) |>
filter(r %in% c(1, max(r)))
```