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