desc() is unnecessary, as later filtered both first and last (#1447)
This commit is contained in:
parent
58547b1ec4
commit
c6f11c6707
|
@ -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)))
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue