From f40e78af083a2a8df676d92af87431db1831b8cf Mon Sep 17 00:00:00 2001 From: Floris Vanderhaeghe Date: Fri, 2 Feb 2024 01:41:06 +0100 Subject: [PATCH] Chapter 13 (numbers): minor updates (#1627) * numbers.qmd: improve variable name for IQR * numbers.qmd: textual fix --- numbers.qmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/numbers.qmd b/numbers.qmd index c364d65..33d50f9 100644 --- a/numbers.qmd +++ b/numbers.qmd @@ -643,11 +643,11 @@ But the code below reveals a data oddity for airport [EGE](https://en.wikipedia. flights |> group_by(origin, dest) |> summarize( - distance_sd = IQR(distance), + distance_iqr = IQR(distance), n = n(), .groups = "drop" ) |> - filter(distance_sd > 0) + filter(distance_iqr > 0) ``` ### Distributions @@ -717,7 +717,7 @@ Finally, don't forget what you learned in @sec-sample-size: whenever creating nu There's one final type of summary that's useful for numeric vectors, but also works with every other type of value: extracting a value at a specific position: `first(x)`, `last(x)`, and `nth(x, n)`. -For example, we can find the first and last departure for each day: +For example, we can find the first, fifth and last departure for each day: ```{r} flights |>