::: {.cell hash='03_Data_preprocessing_cache/revealjs/fraction_delayed3_d7a2144d67a992806d7d0a1ee2ff0629'}

```{.r .cell-code}
flights %>%
  mutate(is_delayed = if_else(dep_delay > 0, 1, 0)) %>%
  group_by(month) %>%
  filter(!is.na(is_delayed)) %>%
  summarise(fraction_delayed = sum(is_delayed) / n())
```
:::