Chapter 13 (numbers): minor updates (#1627)
* numbers.qmd: improve variable name for IQR * numbers.qmd: textual fix
This commit is contained in:
parent
716cc5b5c5
commit
f40e78af08
|
@ -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 |>
|
||||
|
|
Loading…
Reference in New Issue