From 164172d32a85a9774453be66882543a30ec91395 Mon Sep 17 00:00:00 2001 From: Pooya Taherkhani Date: Mon, 8 Feb 2021 10:29:21 -0600 Subject: [PATCH] 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. --- transform.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transform.Rmd b/transform.Rmd index 4dcc444..663aa99 100644 --- a/transform.Rmd +++ b/transform.Rmd @@ -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() )