diff --git a/transform.Rmd b/transform.Rmd index a45507b..15cf4c6 100644 --- a/transform.Rmd +++ b/transform.Rmd @@ -483,7 +483,7 @@ summarise(flights, delay = mean(dep_delay, na.rm = TRUE)) (we'll come back to what that `na.rm = TRUE` means very shortly.) -`summarise()` is terribly useful unless we pair it with `group_by()`. This changes the unit of analysis from the complete dataset to individual groups. Then, when you use the dplyr verbs on a grouped data frame they'll be automatically applied "by group". For example, if we applied exactly the same code to a data frame grouped by date, we get the average delay per date: +`summarise()` is not terribly useful unless we pair it with `group_by()`. This changes the unit of analysis from the complete dataset to individual groups. Then, when you use the dplyr verbs on a grouped data frame they'll be automatically applied "by group". For example, if we applied exactly the same code to a data frame grouped by date, we get the average delay per date: ```{r} by_day <- group_by(flights, year, month, day)