From bb7e18522e8199b993d815f1e59dfaaa491d99c7 Mon Sep 17 00:00:00 2001 From: hadley Date: Thu, 10 Nov 2016 11:09:51 -0600 Subject: [PATCH] Minor fixes --- factors.Rmd | 2 +- transform.Rmd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/factors.Rmd b/factors.Rmd index 537f69d..f00b959 100644 --- a/factors.Rmd +++ b/factors.Rmd @@ -64,7 +64,7 @@ y2 <- factor(x2, levels = month_levels) y2 ``` -If you want a want, you can use `readr::parse_factor()`: +If you want an error, you can use `readr::parse_factor()`: ```{r} y2 <- parse_factor(x2, levels = month_levels) diff --git a/transform.Rmd b/transform.Rmd index 30fac27..ccae33c 100644 --- a/transform.Rmd +++ b/transform.Rmd @@ -773,7 +773,7 @@ Just using means, counts, and sum can get you a long way, but R provides many ot # What proportion of flights are delayed by more than an hour? not_cancelled %>% group_by(year, month, day) %>% - summarise(hour_perc = mean(arr_delay > 60, na.rm = TRUE)) + summarise(hour_perc = mean(arr_delay > 60)) ``` ### Grouping by multiple variables