From 825dacdaaa8dd63114f85c97430680bc8d39eac4 Mon Sep 17 00:00:00 2001 From: hadley Date: Fri, 22 Jul 2016 11:22:02 -0500 Subject: [PATCH] Correct ranking for worst delays Fixes #119 --- transform.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transform.Rmd b/transform.Rmd index 3193d91..ae032c5 100644 --- a/transform.Rmd +++ b/transform.Rmd @@ -837,7 +837,7 @@ Grouping is most useful in conjunction with `summarise()`, but you can also do c ```{r} flights_sml %>% group_by(year, month, day) %>% - filter(rank(arr_delay) < 10) + filter(rank(desc(arr_delay)) < 10) ``` * Find all groups bigger than a threshold: