Skip to content

Commit f40e78a

Browse files
authored
Chapter 13 (numbers): minor updates (hadley#1627)
* numbers.qmd: improve variable name for IQR * numbers.qmd: textual fix
1 parent 716cc5b commit f40e78a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

numbers.qmd

+3-3
Original file line numberDiff line numberDiff line change
@@ -643,11 +643,11 @@ But the code below reveals a data oddity for airport [EGE](https://en.wikipedia.
643643
flights |>
644644
group_by(origin, dest) |>
645645
summarize(
646-
distance_sd = IQR(distance),
646+
distance_iqr = IQR(distance),
647647
n = n(),
648648
.groups = "drop"
649649
) |>
650-
filter(distance_sd > 0)
650+
filter(distance_iqr > 0)
651651
```
652652

653653
### Distributions
@@ -717,7 +717,7 @@ Finally, don't forget what you learned in @sec-sample-size: whenever creating nu
717717

718718
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)`.
719719

720-
For example, we can find the first and last departure for each day:
720+
For example, we can find the first, fifth and last departure for each day:
721721

722722
```{r}
723723
flights |>

0 commit comments

Comments
 (0)