Drop na.rm=TRUE when data is already purged of NAs (#811)

In transform.Rmd (Chapter 5, Data Transformation), under Counts (5.6.3),
we removed na.rm = TRUE when computing mean because all NAs for
arr_delay were already removed when creating not_cancelled dataset.
This commit is contained in:
Pooya Taherkhani
2021-02-08 10:29:21 -06:00
committed by GitHub
parent 1c21ba1e68
commit 164172d32a

View File

@@ -592,7 +592,7 @@ The story is actually a little more nuanced. We can get more insight if we draw
delays <- not_cancelled %>%
group_by(tailnum) %>%
summarise(
delay = mean(arr_delay, na.rm = TRUE),
delay = mean(arr_delay),
n = n()
)