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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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)))
```